rp
02/01/2022, 12:57 PMerr.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.