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
Neto
Neto12mo ago
what auth lib are you using?
Matt
Matt12mo ago
import { signIn, signOut, useSession } from "next-auth/react";
Neto
Neto12mo ago
Client API | NextAuth.js
The NextAuth.js client library makes it easy to interact with sessions from React applications.
Matt
Matt12mo ago
bro ur a gangster
Want results from more Discord servers?
Add your server
More Posts