signOut in expo

I using authClient.signOut() in my auth but alway return notFound screen. How signOut works and what returns? How can i fix it?
11 Replies
stasyn1410
stasyn1410OP3mo ago
bekacru
bekacru3mo ago
hmm? does it redirects you itself to a 404 screen?
stasyn1410
stasyn1410OP3mo ago
yes
bekacru
bekacru3mo ago
unless you have some logic redirecting based on the user session, signOut by itself doesn't cause any kind of navigation.
stasyn1410
stasyn1410OP3mo ago
I have redirect to /login after logout but i got notFound
bekacru
bekacru3mo ago
check where it's after the redirect. Better Auth doesn't redirect it to the 404 page by itself.
stasyn1410
stasyn1410OP3mo ago
@bekacru have you seen this?
bekacru
bekacru3mo ago
yeah so it redirected to /login? right?
stasyn1410
stasyn1410OP3mo ago
at start to notFound after interaction (click) to login
bekacru
bekacru3mo ago
hmm yeah that might have something to do with how you're doing the routing. maybe (public)/login and /login are different. but pretty sure, it's nothing related to how better auth interacts with expo.
stasyn1410
stasyn1410OP3mo ago
thanks, i fixed, it was invalid route (public)/login not /login

Did you find this page helpful?