...
You should have created an application in Citesphere. If not, create one!
You should have the following information for the application with you:
client_id
- A unique identifier for your application. This is auto-generated for you during the application creation.Example:
OAUTHCLIENT007
client_secret
- An auto-generated secret identifier which will be visible only right after you create the application. If you had lost it, go back and create a new application.redirect_url
- You should have given a callback URL while creating the application in Citesphere. If you forgot this, you can check it back in Citesphere.
Authorization Flow
From your application, redirect your user to the following URL with specified parameters. Maybe have a button that says
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
GET /api/v1/oauth/authorize
Query Parameters
Name | Type | Description |
---|---|---|
|
| Required. The client ID you received from Citesphere for your App. |
|
| Required. A space-delimited list of scopes. Example: |
|
| Required. Tells the authorization server which grant to execute. Example: |
|
| An unguessable random string. It is used to protect against cross-site request forgery attacks. You will need to use the same |
This request will take you to Citesphere, where the user will enter the credentials and
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
If the user
Status | ||||
---|---|---|---|---|
|
redirect_url
with the following query parameters.Name | Type | Description |
---|---|---|
|
| A unique string you should use to get the |
|
| The same |
Example: https://<your_app_redirect_url>?code=xyz123&state=mystate
Info |
---|
Note that this step happens in the browser, initiated by your application’s user. That means Your application should have a controller in the backend to retrieve |
Get Access Token
Status | ||||
---|---|---|---|---|
|
POST /api/v1/oauth/token
Note |
---|
This step should NOT be done in the browser. Why? You have to pass your At any cost, you should NOT expose your |
Query Parameters
Name | Type | Description |
---|---|---|
|
| Required. The client ID you received from Citesphere for your App. |
|
| Required. The client secret you received from Citesphere for your App. |
|
| Required. The code you received as a response after the user gave the permissionin the previous step |
|
| The URL of the application you configured in Citesphere |
|
| The unguessable random string you provided (and received back) during the authorization previous step. |
|
| Required. Use For a list of values, check https://auth0.com/docs/applications/application-grant-types |
...