Who is responsible for exchanging Access Token? SPA or backend? #3585
Unanswered
baominwang
asked this question in
Q&A
Replies: 1 comment
-
Hello @baominwang In the OAuth2 Authorization Code Flow with PKCE (Proof Key for Code Exchange), the client application (in this case, the Single Page Application or SPA) is responsible for initiating the authorization flow and exchanging the authorization code for an access token.
PKCE is used in this scenario to ensure that the authorization code cannot be intercepted and used by an attacker. Even though the backend server is not directly involved in the token exchange process, PKCE is still necessary for the SPA to securely handle the authorization code and access token. Let me know if that helps. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When I check SPA and public client with PKCE, the doc mentions that redirect_uri should be set to "https://myapp.com/callback". That's to say, backend server should receive the request. I have two questions:
Beta Was this translation helpful? Give feedback.
All reactions