What is the key that SuperTokens use to sign access tokens ? I need to provide it to mongodb form so...
y
What is the key that SuperTokens use to sign access tokens ? I need to provide it to mongodb form some JWT verifications purposes.
y
So in short I can tell the SuperTokens to always use some my told key to sign access tokens so I would know the key and use it where I want ?
r
Yea. It will use the static (non changing key). It won’t be a key that you have given supertokens, but one that supertokens generates
y
Oh Okh Thanks
Why is this error coming when I set the useDynamicAccessTokenSigningKey to false ?
r
Is this giving a 500 error?
y
This is log that is coming
r
Right. So you get back a 401 from the api right?
y
The status code is not mentioned any where. The error is coming in the pages wrapped in SessionAuth to protect the pages
r
are you calling getSession function somewhere?
y
Not getSession but calling Session.getSessionWithoutRequestResponse(accessToken) this one tho
Frontend logs are like this
r
Right. You should surround that with try catch and handle the errors appropriately. See our docs
Anyway, the issue is that you need to refresh the token
Or create a new session
And then the new access token will work
y
So I should just logout once and then log in once again. This should fix the error right ?
r
it should
but really depends on if you have setup the error handling for session properly
as mentioned in our docs
y
Could you please provide me the link of this section of docs ?
r
Please see our session docs
Or I can provide a link sometime next week 🙂
y
Oh Okh😅
Thanks for the guidance man. You guys really doing a great job
r
Thanks!
y
Managed to solve the above error. But now getting this error sometimes 🥹
r
Which core version are you using?
And what’s the error stack from the core logs?
y
I am using the core version 6.0
I cant see any logs from the core tho
r
Are you using the managed service?
y
Yes
r
Ah ok. Let me check
This error doesn’t happen all the time right?
y
Yes, sometime only
r
Yeaaa. It’s temporary. You can ignore it.
It can happen sometimes when too many queries are being sent to the core. In dev env, there are heavy restrictions on the number of connections etc
y
Oh Okh.
6 Views