Potnovus's Posts
Nairaland Forum › Potnovus's Profile › Potnovus's Posts
1 (of 1 pages)
I'll try to give you general guidance here since this is an authentication problem, irrespective of technology used; also because I'm not necessarily a nextjs engineer. However, I'm aware that NextAuth uses JSON Web Tokens (JWTs) for managing user-sessions, with the option to persist session info in a database. Without knowing the specifics of your implementation and authentication needs, I can only advise that you pay attention to the expiration-time (Time To Live) set for the generated JWTs after you authenticate a user for the first time. When you increase the TTL of your tokens, you allow the user session to live a bit longer. That been said, if as part of your authentication flow, you maintain both a "refresh" and "access" token, then, you may have to decide which of the tokens' TTL you want to increase to satisfy the authentication need of your solution. I hope this helps. |
1 (of 1 pages)