How do I get the users phone number after the callback?
i am using: auth0-lock-passwordless
var lock = new Auth0LockPasswordless('our_token', 'our_domain.au.auth0.com', {
auth: {
responseType: 'code'
}
})
lock.sms({
authParams: {
scope: 'openid profile phone_number'
},
callbackURL: 'http://127.0.0.1:8080',
}, (err, profile, id_token, access_token, state, refresh_token) => {
if(err) console.log(err)
console.log(err, profile, id_token, access_token, state, refresh_token)
})
I need to use the parameter code to get the user’s phone_number the lack of documention on this is bad. Using a callback I can’t get a token so what do I do with the ‘code’ parameter.
Please advice