Relative Content

Tag Archive for next.jsnext-auth

How to fix the redirection in the NextAuth signOut

I’m trying to execute the signOut of NextAuth in my NextJS project in the host, and i’m having the famous message : “This site can’t be reached” while redirecting to the login page.
Note that the redirection works perfectly in the locale on development and production mode

How to fix the redirection in the NextAuth signOut

I’m trying to execute the signOut of NextAuth in my NextJS project in the host, and i’m having the famous message : “This site can’t be reached” while redirecting to the login page.
Note that the redirection works perfectly in the locale on development and production mode

NextAuth Update User Session

useEffect(() => { // Check if token exists if (token && typeof token === “string”) { async function handleUpdate() { try { const response = await apiClient.get(`/auth/update-email?token=${token}`); if (!response.error) { { // Update Session here setSuccess(true); redirect(callbackUrl || “/account”); } } else { !success && setError(response.error); } } catch (err) { console.error(“Error verifying email: “, […]

next-auth server side session not updating

im using nextjs 14 and nextauth5 for login authentication. client-side session is updating but not in server-side. im trying to change the default session values on next-auth by following their docs (name, email, image).