Why every credentials members are transformed into string? #11473
Unanswered
EarthMessenger
asked this question in
Help
Replies: 1 comment
-
Hey there, I got the same issue today. Did you find a proper answer? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using credentials as the login method. I pass boolean values and numbers into the
signIn
method withsignIn("credentials", { num: 1, str: "1", bool: true });
, but they become strings in theauthorize
method.Is this the expected behavior? If so, is there an elegant way to verify that a string is a number using Zod?
You can see a reproduction of this issue here: https://github.com/EarthMessenger/authjs-credentials-report.git.
Beta Was this translation helpful? Give feedback.
All reactions