exkazuu
09/27/2023, 7:40 AMSessionAuth.
I am unsure if the inclusion of SessionAuth is a requirement in a Next.js application. My aim is to circumvent the use of SessionAuth as it tends to render an empty page when session.loading is set to true, leading to an undesirable flickering effect.
Given that pages in a Next.js application are capable of receiving session information from getServerSideProps(), it would seem reasonable to assume that we could verify a user's valid session as the server serves the initial page. (I wish to note that a client program should be in place to redirect and instigate server access when signOut() is invoked client-side.)
My primary concern lies in the area of security. Is there any potential security risk when a page necessitates a session in Next.js but does not include SessionAuth? My particular worry centres on session expiration, even though I understand that sensitive information cannot be retrieved by the user from the server after the expiration.
I look forward to your guidance on this matter. Thank you in advance.rp_st
09/27/2023, 8:36 AMSession.validateClaims (as shown in https://supertokens.com/docs/thirdpartyemailpassword/common-customizations/sessions/protecting-frontend-routes for custom UI) to verify the claims (this is essentially what session auth does)exkazuu
09/27/2023, 8:44 AMSuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).
Powered by