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
With the signIn method it should be possible to optionally do a getSession so you can manually call for session data and manually handle the errors coming from the getSession endpoint.
Would you be willing to help implement this feature?
Some extra information why we need this:
Our 2FA/OTP middleware on the Laravel API returns a 428 error on user/me (or any other endpoint if 2FA is needed). The signIn method always calls getSession, and the error from the user/me API endpoint dies in getSession (clearing the token etc.). Because this catch we need to manually call the user/me endpoint outside this module. So right now we want to prevent the getSession getting called so we still have the token etc. and call it manually.
Another solution could also be to allow the API error(s) from getSession bubble through (and not clear the token etc. immediately) or create some kind of hook so we can intercept on special errors like a 428. This is more work and need more design to be able to create this for local and refresh provider without drifting to far from the authjs provider.
Provider
AuthJS
Local
Refresh
New Provider
The text was updated successfully, but these errors were encountered:
Describe the feature
With the
signIn
method it should be possible to optionally do agetSession
so you can manually call for session data and manually handle the errors coming from thegetSession
endpoint.How would you implement this?
I created a PR: #702
Additional information
Some extra information why we need this:
Our 2FA/OTP middleware on the Laravel API returns a
428
error onuser/me
(or any other endpoint if 2FA is needed). ThesignIn
method always callsgetSession
, and the error from theuser/me
API endpoint dies ingetSession
(clearing the token etc.). Because this catch we need to manually call theuser/me
endpoint outside this module. So right now we want to prevent thegetSession
getting called so we still have the token etc. and call it manually.Another solution could also be to allow the API error(s) from
getSession
bubble through (and not clear the token etc. immediately) or create some kind of hook so we can intercept on special errors like a 428. This is more work and need more design to be able to create this for local and refresh provider without drifting to far from theauthjs
provider.Provider
The text was updated successfully, but these errors were encountered: