I am confused how OAuth2 takes you through an entire flow and redirects you back to the page.
For example, I have an auth endpoint: /auth/authorize
, callback endpoint /auth/callback
,
and token endpoint: /auth/token
/auth/authorize
gives back the authorize code
, redirects to the /auth/callback?code=mycode
, but how does this smoothly grab the access_token
and redirect the user to the original page?
Should my /auth/callback
redirect to my /auth/token
or something? And then /auth/token
redirects back to the page?
The callback URLs, also known as redirect URIs, tell the server where to send the user with the proper tokens after authentication. For purposes within Skuid, you'll want the end user sent back to the Skuid site/org accessing the data.
The callback URL typically specifies the URL of an app that is designated to receive an authorization code on behalf of the client app. In addition, this URL string is used for validation.
A callback URL is an address that a server provides, and any computer in the Internet/private network can POST data to it. This method is more efficient than a computer continuously waiting or polling for data.
A redirect URI, or reply URL, is the location where the authorization server sends the user once the app has been successfully authorized and granted an authorization code or access token.
This might will help you in understanding the flow:
Reference: https://techannotation.wordpress.com/2015/06/17/spring-oauth2-with-authorization-code/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With