Hi.
I am trying to use auth0 for passwordless authentication of a mobile application, where the only connection between my user and the backend will be the phone number.
What I am trying to do is - user enters phone number - which i POST
to my backend, and which POSTs
that to /passwordless/start
.
Then I take the OTP I receive and send it to /passwordless/verify
via my backend, which returns the access_token
and id_token
.
Problem is, how do I get the user details, ie, phone number, so I can create an account for that user in my database?
The id_token
returned by the verify
endpoint only contains name and nickname, neither of which I provided, and it doesn’t contain the phone number as well, so I cannot check if that user has previously registered.
I get a similar response if i GET to the /userinfo
endpoint.
Have I misconfigured something or is this intended? If so, how do I identify users via access and id tokens from the frontend? Do I use a custom response from my backend to send back to the phone? What if I need the user details then in some other part?