KYAN1TE
WWasp-lang
•Created by KYAN1TE on 1/7/2024 in #đŸ™‹questions
Disable case sensitivity on username register/login?
So I can enforce my user that is registering to use a lowercase username by doing the following:
However, as there is no
additionalFields
type of option on the <LoginForm>
component, I am stumped as to how to do something similar.
In an ideal world, I'd just lowercase it all on the server side... but it kind of defeats the point of using the built in batteries included auth, right?
Any way I can do this without running with my own auth? Cheers12 replies
WWasp-lang
•Created by KYAN1TE on 12/26/2023 in #đŸ™‹questions
Custom auth error messages?
I'm following the docs here: https://wasp-lang.dev/docs/auth/username-and-pass#customizing-the-auth-flow
I now have a custom user registration page & when I try to register with a username that already exists, my signup endpoint (that otherwise works fine), returns a:
"Save failed" doesn't seem like a very helpful error message.
How do we go about catching these errors or managing what is happening under the wasp magic going on? This will allow me to bubble up more meaningful error messages to the user, such as "Username is already in use. Please try again."
Thanks
14 replies
WWasp-lang
•Created by KYAN1TE on 12/18/2023 in #đŸ™‹questions
[SOLVED] Object relation works when running app but doesn't compile to TypeScript?
My database schema looks as follows:
Meanwhile on my client when I do:
I get the following TypeScript error under task.
category
.name:
Property 'category' does not exist on type 'GetResult<{ id: number; description: string; isDone: boolean; userId: number | null; categoryId: number; }, unknown> & {}'. Did you mean 'categoryId'?ts(2551)
I have seen examples within the Wasp repo that allow this to work.
This is done by using the includes
part of the ORM like so:
However despite this, it still seems like I am missing a trick to get the type safety to understand that a Task
is expected to reference Category
(object) as well as the CategoryId
?
This is also blocking me from successfully deploying to Fly.io
Thanks14 replies