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
Thanks for this amazing tutorial. I'm just curious, as the access token from directus will expire in 15 minutes, so won't ever user just be logged out every 15 seconds from this app? Or is the refresh token handled automatically by nextauth or directus? If not, how do you handle refreshing the access token? THanks.
The text was updated successfully, but these errors were encountered:
No, the refresh is there to renew the access_token every 15s
I didn't read through the code correctly, but you can use axios interceptor to handle refresh token
There is also apollo-refresh-token but I don't know handle that efficiently with React Query
Sugestion
you can create a function that with help you get the renew the token by passing the refresh_token
So you will verify error status in the [nextjsAuth...] file, if you get 401 error that means that the user is not authorize
then you fetch the token
const graphQLAPI = process.env.NEXT_PUBLIC_GRAPHQL I cannot signup with error
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (system, line 0)
HTTP://localhost:3000/undefined/system
[Error] Unhandled Promise Rejection: SyntaxError: The string did not match the expected pattern.
promiseEmptyOnRejected
promiseReactionJob
Is it possible to integrate the QR-Code and 6-digit one-time password into the template?
Thanks for this amazing tutorial. I'm just curious, as the access token from directus will expire in 15 minutes, so won't ever user just be logged out every 15 seconds from this app? Or is the refresh token handled automatically by nextauth or directus? If not, how do you handle refreshing the access token? THanks.
The text was updated successfully, but these errors were encountered: