I have supertokens-frontend running on localhost:3...
# support-questions
p
I have supertokens-frontend running on localhost:3000 and different project for backend on localhost:3002 from UI when I am trying to login to google, I get "recipeImplementation.js:163 GET http://localhost:3002/auth/authorisationurl?thirdPartyId=google 404 (Not Found)" but localhost:3002 is up
r
Hey! Can I see your backend config and frontend config?
p
quick call?
r
alright
meet.google.com/ehq-hxxu-ono
p
@User quick call for jwt and hasura integration?
r
I won't be able to get on a call now
If you could paste the code that you have written, it would be great
p
sure
r
this seems fine. Do the console logs get printed?
p
yes in that input accessTokenPayload is empty
and at the frontend sessionInfo is empty too
r
Can you call the API login API via postman and copy / paste the
sAccessToken
returned from the set-cookie header?
p
okay
In response I get { "status": "OK", "user": { "email": "prachi@suggaa.com", "id": "ed8ffbc4-706e-443b-84b8-366953061fbb", "timeJoined": 1646126690320 } }
r
Can you show me the response headers from postman and in there, you will see "set-cookie" with "sAccessToken"
I want to see the value of that
As you can see above, it contains the JWT key in the access token. How are trying to fetch it on the frontend?
p
How to access this at the backend , if I want to print?
r
p
this i have done.
backend is fine.
r
There is no key called
sessionInfo
on the frontend from the userContext. There is
accessTokenPayload
. So it should be:
Copy code
let {userId, accessTokenPayload} = useSessionContext();

let jwt = accessTokenPayload.jwt;
As the docs say
Is there anywhere in the docs which says
sessionInfo
?
p
yes. accessTokenPayload only.
thank you
r
Does it work now?
p
yes
103 Views