Direct to a defined page after successful login
Hello
I have the standard LoginPage, as given in the ToDo App tutorial (see picture).
I now would like to implement that the user get's to the /board Page, when successfully logged in. Can anybody tell me how I can do that or where I could find a good solution?
Thanks a lot!
(MacOS, wasp version = 0.13.2
kapa.ai•16d ago
Hi @Sanchez. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Sure, you can achieve this by using the
onAuthSucceededRedirectTo
field in your Wasp code. This field allows you to specify the route to which Wasp will send a user after a successful login/signup. By default, it is set to "/", but you can change it to "/board" to meet your requirements.
Here is how you can do it:
Please note that automatic redirect on successful login only works when using the Wasp-provided Auth UI. You can read more about it here (https://wasp-lang.dev/docs/auth/overview#onauthsucceededredirectto-string).
Also, keep in mind that this feature was a result of a feature request (https://github.com/wasp-lang/wasp/issues/327) and might not be available in older versions of Wasp. Make sure you are using a version that supports this feature.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Sanchez, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?Filip•15d ago
Hi @Sanchez, the bot is right!
Here are the docs for this feature: https://wasp-lang.dev/docs/auth/overview#onauthfailedredirectto-string-
2.7KMembers
View on DiscordWant results from more Discord servers?
More PostsRemove email loginIs it possible to only rely on OAuth and disable email login when using OpenSaas? When I comment outHow to use Env variables in main.wasp?I want to set the email authentication
`fromField.name` to `process.env.FROM_NAME`
and `fromField.can not find "wasp/server/_types" module or declarationany suggestion? this error won't effect dev, but I can't have the right type with action's params arDisable email loginIf I only want Google signup, is there a way to remove the email login? I tried commenting
```
emailDo I have a way to use useLazyQuery ?My app filters some data.
I need to be able to refetch whenever the user clicks on "search" with theWhere to see migration files?I have messed up one migration (because I had to delete my local code), and now I don't know where tFile upload size limitI'm trying to implement max file upload size to the s3 bucket. I've handled the front-end but I worrAuthis there a sample bypass to login the auth while in developmentQuick Start not working?I'm following this tutorial: https://wasp-lang.dev/docs/quick-start
After opening my terminal and rI cant see ubunbtu on my Linux sub system folderI just started with this programming stuff and i wanted to try my app with this new ai called magegp