twitter-api-typescript-sdk icon indicating copy to clipboard operation
twitter-api-typescript-sdk copied to clipboard

How to identify user between /login and /callback

Open feresr opened this issue 7 months ago • 1 comments

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://github.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.

feresr avatar Nov 23 '23 14:11 feresr