Closed lwolle closed 8 months ago
Thanks for the kind words!
onSuccess and onValidationError aren't officially exposed through the Auth
component, although they would be forwarded to the internal forms if you add these props.
Another way to redirect after log in would be something like this on your log in component.
const { isAuthenticated, isLoggingIn } = useAuth()
useEffect(() => {
if (!isLoggingIn && isAuthenticated) {
router.push('/path')
}
}, [isAuthenticated, isLoggingIn])
I've updated the template, thanks for the suggestion!
Thank's for the response. I'd take a look, but I felt that reacting to onSuccess would be a clean way to achieve it.
Yes i agree it is, I'm going to take this feedback into account with the refactoring of the auth services I'm working on.
First of all, thank you for the great project. It's a really nice extension of chakra-ui and complements it really well.
The
Auth
component is awesome, I'm using it in conjunction with the supabase-client integration. After successful (onSuccess
login, I'd like to navigate to a specific route, and the redirect URL doesn't appear to do the trick, and I'd like to work with my custom router. So I've looked into the components props andonSuccess
is forwarded to all views, but the types and the documentation do not mention it. Is there some reasoning behind that?And it would be lovely, if you could provide an issue template as mentioned in the Contribution Guidelines