You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the auth/identity handler is invoked with an invalid token, it'll throw an error when trying to fetch the current user. This sends the application in an infinite loop trying to get the identity.
letuser=awaitclient.querySingle(`select global current_user;`)
This happened when the access token cookie had been set by another EdgeDB instance running on the same host (localhost:3000). But it would also occur with sessions of the same EdgeDb instance if the auth_signing_key was changed, since that would also cause a JWT signature mismatch.
In order to deal with this gracefully, we need to catch the error when trying to fetch the current user and delete the token cookie.
I'm currently preparing a fix and will submit a PR.
The text was updated successfully, but these errors were encountered:
When the
auth/identity
handler is invoked with an invalid token, it'll throw an error when trying to fetch the current user. This sends the application in an infinite loop trying to get the identity.nuxt-edgedb/src/runtime/api/auth/identity.ts
Line 14 in 37ac5c4
This happened when the access token cookie had been set by another EdgeDB instance running on the same host (localhost:3000). But it would also occur with sessions of the same EdgeDb instance if the
auth_signing_key
was changed, since that would also cause a JWT signature mismatch.In order to deal with this gracefully, we need to catch the error when trying to fetch the current user and delete the token cookie.
I'm currently preparing a fix and will submit a PR.
The text was updated successfully, but these errors were encountered: