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
I just faced the same problem(I haven't tested my app after the login was successful).
It looks like no headers are set with POST on this endpoint '/client/sessions/${_tokenCache.sessionId}/tokens'
I have local copy on my side and after passed headers on _updateSessionToken() is working OK
final resp = await _fetch(
path: '/client/sessions/${_tokenCache.sessionId}/tokens',
headers: _headers(HttpMethod.post),
);
If you use ClerkAuth widget, you may want to pass SessionTokenPollMode.regular as will try with a timer to refresh the token on each 55 seconds(the token seems to live 60s). In general if the app is in background and not in debug mode this timer will be blocked by the OS and you should always rely on manually refresh the token when get 401 from your server.
Steps to reproduce
Api
instanceapi.sessionToken()
Expected results
As per documentation, session token should be refreshed
Actual results
Backend POST request returns a 401 with the following error:
Code sample
Code sample
Screenshots or Video
Screenshots / Video demonstration
Logs
There are no logs, which adds to the confusion.
The request fails silently, and
sessionToken()
returns an empty string.Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: