Mutation alters user in database then redirects to homepage. How can i force user session to update
I have a page /form when i press the submit button i activate a mutation that updates a field on user to true it then redirects to "/". When it redirects it does not update the ui and show green arrows for that form. I have to refresh page for the updated user object to come in with that field set to true. even tho it is true when i am redirected and i see red arrows indicating its false in database
4 Replies
what auth lib are you using?
import { signIn, signOut, useSession } from "next-auth/react";
Client API | NextAuth.js
The NextAuth.js client library makes it easy to interact with sessions from React applications.
bro ur a gangster