You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Im using nextAuth@beta version to implement authentication in my nextjs14 app.
When user got logged in it is routing to the portal screen which is fine but after routing its not changing url in the address bar which is quite a problematic for me. I have search a lot about it but got nothing
Im using nextAuth@beta version to implement authentication in my nextjs14 app.
When user got logged in it is routing to the portal screen which is fine but after routing its not changing url in the address bar which is quite a problematic for me. I have search a lot about it but got nothing
`export const authConfig: NextAuthConfig = {
pages: {
signIn: "/login",
},
callbacks: {
async jwt({ token, user }) {
if (user && user?.accessToken) {
token.accessToken = user.accessToken;
}
return token;
},
async session({ session, user, token }) {
session.user = {
name: session?.user?.name,
email: session?.user?.email,
image: session?.user?.image,
accessToken: token?.accessToken,
};
return session;
},
authorized({ auth, request: { nextUrl, url } }) {
const isLoggedIn = !!auth?.user;
const isRootOrDashboard = nextUrl.pathname === "/" || nextUrl.pathname.startsWith("/portal");
},
providers: []
};
`
The text was updated successfully, but these errors were encountered: