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

authParams... how do I retrieve the results? #37

Closed
ddarbyson opened this issue Oct 4, 2015 · 2 comments
Closed

authParams... how do I retrieve the results? #37

ddarbyson opened this issue Oct 4, 2015 · 2 comments

Comments

@ddarbyson
Copy link

After a successful log, how to I reveal the values of authParams? I can see the returned url contains the state parameter:

https://mydomain.net/public/login/?code=MKeyK8NNe5dijXW3&state=zRx4w7thku0XAqlN

However, state is encoded... I'm trying to make a callback url to the original location where the user came from.

function signin() {

    lock.show({
        callbackURL: AUTH0_CALLBACK_URL
      , icon: '/app/images/auth0-badge.png'
      , socialBigButtons: true
      , disableResetAction: true

      , authParams: {
        orig_callback_url: getParameterByName('callback_url')
      }

    });

}
@ddarbyson
Copy link
Author

Figured it out... You can't make up your own authParams. To pass through the original call back url you need to use the state parameter:

function signin() {

    lock.show({
        callbackURL: AUTH0_CALLBACK_URL
      , icon: '/app/images/auth0-badge.png'
      , socialBigButtons: true
      , disableResetAction: true

      , authParams: {
        state: getParameterByName('callback_url')
      }

    });

}

@github-actions
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant