Justine
05/12/2023, 8:01 AMAuthorization: Bearer
method to verify session on the separate Fastify API, how can I extract the access token from the frontend to include in the headers? Is there a hook available for it? I can't seem to find it. Also, is my idea even possible? Can I verifySession on another API that doesn't not run Supertokens backend?nkshah2
05/12/2023, 8:02 AMJustine
05/12/2023, 8:03 AMsupertokens-auth-react
version ^0.32.3
Justine
05/12/2023, 8:03 AMnkshah2
05/12/2023, 8:05 AMgetAccessToken
function on the frontend that gives you the access token. You can attach that as a bearer token to requests.nkshah2
05/12/2023, 8:05 AMnkshah2
05/12/2023, 8:07 AMJustine
05/12/2023, 8:08 AMgetAccessToken
function but it returns me undefined
. Let's me try again, maybe I'll record a short video. Would you be free for a quick Discord channel call?nkshah2
05/12/2023, 8:09 AMJustine
05/12/2023, 8:11 AMnkshah2
05/12/2023, 8:12 AMexposeAccessTokenToFrontendInCookieBasedAuth
to true when initialising the Session recipe. This will let the frontend read the access tokenJustine
05/12/2023, 8:13 AMJustine
05/12/2023, 8:16 AMnkshah2
05/12/2023, 8:18 AM