auth0 / lock-passwordless

Auth0 Lock Passwordless [DEPRECATED]
MIT License
90 stars 29 forks source link

state and refresh_token return undefined when logging in with emailcode #133

Closed braydie closed 7 years ago

braydie commented 7 years ago

I'm using version 2.2.3 of passwordless lock. I have the following code within a function:

var lock = new Auth0LockPasswordless("x", "auth0domain");
lock.emailcode({autoclose: true}, function (error, profile, id_token, access_token, state, refresh_token) {
    if (!error) {
        localStorage.setItem(token, id_token);
        console.log(refresh_token);
    }
});

When this code is invoked, state and refresh_token return undefined.

Am I doing something wrong?

braydie commented 7 years ago

All sorted now

http://stackoverflow.com/questions/42975847/can-i-get-a-refresh-token-using-auth0-passwordless-lock-in-javascript?noredirect=1#comment73052934_42975847

luisrudge commented 7 years ago

Thanks for sharing the answer with us! 🎉