How do I get the access token in client-side components? (v5) #10827
Replies: 1 comment
-
Hi @christopherhan did you ever figure this out? |
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a NextJS frontend and backend APIs written in FastAPI / Python. My backend is using my own User / Account database table (postgres) and not relying on any Adapters. I'm primarily using Google login
I want to pass the auth provider JWT token (
id_token
) in every request to my API inside my client-side components, which I'll then validate on the Python server-side. (see example API call below).It seems like
useSession
no longer contains theaccess_token
is not available on the client side.How can I get the access_token within my client side components so I can send them in my API requests? Or am I thinking about the flow incorrectly / is there a better way to do this?
Beta Was this translation helpful? Give feedback.
All reactions