Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Token calls throw an error when email is missing (SMS authentication broken) #539

Closed
massless opened this issue Jul 1, 2024 · 2 comments
Assignees

Comments

@massless
Copy link

massless commented Jul 1, 2024

We seem to be running an error similar to #507 and presumably this could be because email fields aren't required for SMS authentication.

After logging in with SMS all calls to https://<domain>/v1/token result in the following error and stack trace (when using @nhost/nhost-js version 3.1.5)

@nhost_nhost-js.js?v=366c4814:5967 Uncaught (in promise) RangeError: Invalid time value
    at Date.toISOString (<anonymous>)
    at accessToken (@nhost_nhost-js.js?v=366c4814:5967:31)
    at @nhost_nhost-js.js?v=366c4814:1150:61
    at Array.reduce (<anonymous>)
    at updateContext (@nhost_nhost-js.js?v=366c4814:1134:48)
    at handleAction (@nhost_nhost-js.js?v=366c4814:1728:26)
    at processBlock (@nhost_nhost-js.js?v=366c4814:1759:24)
    at Array.map (<anonymous>)
    at resolveActions (@nhost_nhost-js.js?v=366c4814:1783:46)
    at StateNode2.resolveTransition (@nhost_nhost-js.js?v=366c4814:4322:22)
    at StateNode2.transition (@nhost_nhost-js.js?v=366c4814:4258:17)
    at @nhost_nhost-js.js?v=366c4814:3139:28
    at provide (@nhost_nhost-js.js?v=366c4814:1791:16)
    at Interpreter2._nextState (@nhost_nhost-js.js?v=366c4814:3138:21)
    at @nhost_nhost-js.js?v=366c4814:2506:31
    at Scheduler2.process (@nhost_nhost-js.js?v=366c4814:2337:7)
    at Scheduler2.schedule (@nhost_nhost-js.js?v=366c4814:2321:10)
    at Interpreter2.send (@nhost_nhost-js.js?v=366c4814:2504:23)
    at _a2.id.id (@nhost_nhost-js.js?v=366c4814:3280:15
    ```
@dbarrosop dbarrosop self-assigned this Jul 1, 2024
@dbarrosop
Copy link
Member

dbarrosop commented Jul 1, 2024

Which version are you using? I just remembered we fixed this in 0.32.0

fix: remove email from required fields as some users may not have one @dbarrosop (#529)

Could you try upgrading if you aren't using 0.32.0?

@massless
Copy link
Author

massless commented Jul 1, 2024

Hey @dbarrosop thanks very much for the suggestion, pretty sure that was it and it's working now

@massless massless closed this as completed Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants