I'm developing an API which uses oauth2 for authenticating users. The requirement is to develop a single sign on system for 3 different web applications. Lets take this scenario:
- A user logs in to one of the application (lets say application1).
- application1 receives a token and a refresh token. A refresh token is saved in secure session.
- User goes to second application say application2. But the refresh token can not be used for application2 as it was created for application1.
What is the best way to generate a token for second application without user needing to log in?
Any suggestion would be great. Am I taking a right approach? I use symfony2 (FriendsOfSymfony/FOSOAuthServerBundle)