To use the OAuth Service follow the following steps:
- Visit https://oauth-v2-server.herokuapp.com
- Register/Login
- Create a new project(Make sure that the project name is unique and redirectUrl is valid)
- Store the project credentials
- Goto Login URL https://oauth-v2-server.herokuapp.com/login?projectID=[projectID]&redirectURL=[RedirectURL]&scope=[scope]
- When the user login is successful user will be redirected to the Redirect URL you provided while creating the project with the code. Eg: http://redirectURL?code=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbiI6IjljNjc0YjRj..
- Get the access_token by using the following api: GET:https://oauth-v2-server.herokuapp.com/oauth/token?projectID=[projectID]&projectSecret=[ProjectSecret]&code=[code]&scope=[scope]&redirectURL=[RedirectURL]
- Get the user details by using the following api: GET:https://oauth-v2-server.herokuapp.com/oauth/userinfo?access_token=[access_token]