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
Hi,
My site is using only Google Sign In / Next-Auth with Apollo Client.
In dev run everything works well, but in production build (on Vercel) JWT token is never updated, so after first hour (JWT token from Google is valid for 1 hour) user have to refresh page to get it working.
I see several similar bugs, but I'm not sure if those are the same as mine, so I decided to ask here.
import{useApollo}from'lib/withApollo';import{useSession}from'next-auth/client';constApolloWrapper=({ children })=>{const[googleUser]=useSession();const{ idToken }=googleUser;constapolloClient=useApollo(idToken);return<ApolloProviderclient={apolloClient}>{children}</ApolloProvider>;};
Is there something wrong with my implementation or is this known bug?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
My site is using only Google Sign In / Next-Auth with Apollo Client.
In dev run everything works well, but in production build (on Vercel) JWT token is never updated, so after first hour (JWT token from Google is valid for 1 hour) user have to refresh page to get it working.
I see several similar bugs, but I'm not sure if those are the same as mine, so I decided to ask here.
This is my code:
in apollo wraper:
Is there something wrong with my implementation or is this known bug?
Beta Was this translation helpful? Give feedback.
All reactions