https://supertokens.com/ logo
#support-questions
Title
# support-questions
r

rp

02/01/2022, 12:57 PM
So in case you get
err.type === Session.Error.TRY_REFRESH_TOKEN
, what will you do in there? Show a generic something went wrong error? Also, if you do send back
return { props: { fromSupertokens: 'needs-refresh' } }
to the frontend, the frontend will attempt to manually refresh the session which will call your API (not nextjs backend). So in a way, nextjs is not actually doing the refreshing.. it's just telling the frontend to refresh and then reload the page.
4 Views