hundreds-psychiatrist-38730
09/04/2024, 7:51 PMSet-Cookie
is Session Storage good to use?? i'm also thinking security wise.bland-eye-99092
09/05/2024, 7:14 PMhundreds-psychiatrist-38730
09/05/2024, 7:17 PMuseState
my "biggest" headache has been redirects that happened but state wasn't available yet so another redirect kicked me back to /login
when logged in properly, the state is removed if i manually changed url to e.g. /dashboard
so i will probably look into refreshing my state by doing something within https://www.ory.sh/docs/kratos/self-service/flows/user-login#refreshing-a-session
if that is good 🤔hundreds-psychiatrist-38730
09/05/2024, 7:17 PMbland-eye-99092
09/05/2024, 7:20 PMhundreds-psychiatrist-38730
09/05/2024, 7:20 PMhundreds-psychiatrist-38730
09/05/2024, 7:21 PMbland-eye-99092
09/05/2024, 7:22 PMhundreds-psychiatrist-38730
09/05/2024, 7:28 PMawait auth.login()
where that login()
is pointing to a const
within my auth.tsx
where in the example within Elements are using an useEffect()
i've removed that and just done a
const login = useCallback(async () => {
await sdk.toSession().......
}, [])
This toSession()
is the exact same one from the example.
but instead of redirecting to /
i redirect to /dashboard
which has a beforeLoad:
where i access context
and i check !context.auth.session.active
this is the one that fails.. session.active
is not available yet at that point in time..