Sorry, i don't need to refreshUser, i need to re-r...
# support-questions
e
Sorry, i don't need to refreshUser, i need to re-run my
createNewSession
logic... to add hasura claims Anyway we can do this?
r
Hey!
Ah right. Yea. You can make your own api and call that from the frontend. That api does session verification first and then updates the access token payload
There is a session.updateAccessTokenPayload function available for that on the backend (the session object retrieved from session verification)
e
ahh ye right! got it
thanks again haha 😄
Hey, sorry for disturbing again
somehow I can this error wile using
session.updateAccessTokenPayload
r
hey!
e
session.updateAccessTokenPayload(newSessionPayload, {})
calling the function like this newSessionPayload is what u see in the log ( the hasura claims)
r
you need to add an
await
in front
e
lol, i thought i tried it alrdy
r
lmk if that solves your issue
e
thanks 🙂 yeah it does
got everything working now > email/password & social with custom UI
gonna move to capacitor now, this will probably be hard due to creating own interceptor
might have some more questions, but when i finish i'll probably write small blog how to do next.js / capacitor cross platform app with supertokens auth 😉
r
awesome! You don't need to write your own interceptor
You can use our frontend SDK which will provide you with the interceptors
you just have to give it a custom cookie and window handler that works with capacitor
3 Views