Follow below steps to configure OAuth Provider with miniOrange's Enhance API Security for REST APIs with OAuth/API Token add-on.
Go to OAuth 2.0 Token tab.
Select the OAuth provider to be configured from the dropdown list. Select a custom OAuth provider if you don’t find your OAuth provider in the list.
Enter the provider specific details (if any, such as domain name in case of Okta) and click on Continue.
For custom OAuth provider, enter the below endpoint
a. User info endpoint.
b. Authorization endpoint.
c. Token Endpoint
Copy the Redirect URI and paste it in the OAuth provider’s callback/redirect URIs.
Enter the details such as client ID, client secret, scope and state.
Finally, to configure the username attribute, click on Get username/email Attribute button.
Click on the Fetch token button. Please make sure you have entered all the necessary information in the previous form as the details such as client Id and Client secret will be used to fetch the OAuth token.
After the above step, you will be redirected to your OAuth provider. You will receive the access token once you login into your account.
Paste the OAuth 2.0 Access token obtained from the OAuth provider and click on Get response.
In the received response, copy the JSON attribute against which you are receiving the username/email of the user in the local directory and paste it into the Username/Email Attribute input field, and click on Save.