[Solved] Tutorial: Auth redirect simply throws 500
I'm currently following along in the tutorial and got to the authentication step. I then migrated the database with the new User entity and copy/pasting the authentication pages.
But now when I simply hit the "root" page
/
it doesn't redirect me to the login/signup pages. It simply hits the /me
endpoint and throws a 500 error: HttpError not defined.
The branch with this error can be found here: https://github.com/Kikketer/StorAI/blob/56b2c05be64be57bb370d2d3ec03a76119b40279/main.wasp#L11-L11
The step I was on is here: https://wasp-lang.dev/docs/tutorials/todo-app/06-auth#updating-mainpage-page-to-check-if-the-user-is-authenticatedAuthentication | Wasp
Most of the apps today are multi-user, and Wasp has first-class support for it, so let's see how to add it to our Todo app!
GitHub
StorAI/main.wasp at 56b2c05be64be57bb370d2d3ec03a76119b40279 · Kikk...
Wasp Hackathon entry for a dungeon crawl adventure - StorAI/main.wasp at 56b2c05be64be57bb370d2d3ec03a76119b40279 · Kikketer/StorAI
9 Replies
Hey there. Can you try making the username field optional, eg
username String?
Doing that simply throws an error on migrate (I wiped all of the
.wasp
directory before doing it):
Hm ok. Obviously that is not it.
For future reference you can run
wasp clean
And then wasp start
to recompile everything
Let me try and run your project and see if I can reproduce the errorAwesome thanks. It’s not absolutely holding me up (hackathon) but figured it would be useful to report (which I assume is somewhat the goal of this hackathon)
Hey @Chris there seems to a bug with
usernameAndPassword
auth method. We will work it out ASAP! Thanks so much for bringing it to our attention and sorry for the frustration 🙏
We will let you know as soon as there is an updateFantastic thanks. Glad I could help
Can you update your Wasp version to the latest version? (run
curl -sSL https://get.wasp-lang.dev/installer.sh | sh
) and see if it works now?
Thank you for reporting the bug!Confirmed it works now! Thank you
Wohooo @Chris, you just became a Waspeteer level 2!