#✅ - How to tell if user is signed in?
3 messages · Page 1 of 1 (latest)
@loud tangle, sorry that we didn't get you a reply till now! Still want to get you a reply in the event this wasn't resolved yet.
In a v6 app using Next.js, you can call fetchAuthSession() to determine if the accessToken and iDTokens are defined as seen in an example here for server side usage:
https://docs.amplify.aws/gen1/react/build-a-backend/server-side-rendering/nextjs/#manage-auth-session-with-the-nextjs-middleware
Just for clarity, the getCurrentUser() is only going to check if there's a token in localStorage and won't care if the token is expired or not.
✅ - How to tell if user is signed in?