https://supertokens.com/ logo
#support-questions
Title
# support-questions
a

a.jonline

05/25/2022, 2:33 AM
I keep getting an error after a redirect "requireAuth prop should not change, to solve try adding key prop to all users", anyone ran into this issue? More details in thread.
My homepage route has requireAuth = false, and in the homepage I'm checking if session exists then navigate to another page
In the route page:
In my home page: useEffect(() => { if (doesSessionExist) navigate('/account') return () => { }; }, []);
If I navigate directly to that page it works, but the auto navigate shows that error. Thank you!!
r

rp

05/25/2022, 3:01 AM
Hey!
You need to add a key prop to your routes
A unique key prop
Per route
Add it to the emailpasswordauth component
a

a.jonline

05/25/2022, 3:05 AM
Hey RP! Oh that's what it is ... my bad ... I thought it's something to do with v6. Thank you for your help!
2 Views