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

Setting custom connection scopes not working #1000

Closed
tadeaspetak opened this issue May 10, 2017 · 3 comments · Fixed by #1038
Closed

Setting custom connection scopes not working #1000

tadeaspetak opened this issue May 10, 2017 · 3 comments · Fixed by #1038
Assignees
Labels
bug This points to a verified bug in the code

Comments

@tadeaspetak
Copy link

tadeaspetak commented May 10, 2017

Hi there,

I have just discovered that the option to set custom connectionScopes in a Lock constructor stopped working at version 10.16.0. I have experimented a little and the bug occurs from 10.12.0 and above.

This is how I construct the lock:

return new Auth0Lock(config.clientId, config.domain, {
  auth: {
    connectionScopes: {
      'google-oauth2': ['https://www.googleapis.com/auth/gmail.metadata']
    },
    params: {
      scope: 'openid offline_access',
      device: 'Chrome browser'
    },
    redirect: false
  }
});

Works flawlessly in 10.11.0 but in 10.12.0, 10.13.0 and 10.16.0, no custom scopes are ever set.

@tadeaspetak tadeaspetak changed the title Setting ConnectionScopes not working Setting custom connection scopes not working May 10, 2017
@luisrudge luisrudge self-assigned this May 10, 2017
@maksymilian-majer
Copy link

I experienced the same issue. @tadeaspetak thanks for your info about working version. I downgraded to 10.11.0 and it's working :)

@Faulik
Copy link

Faulik commented May 24, 2017

I can confirm this. And downgrade helped.

@cocojoe cocojoe added bug This points to a verified bug in the code S4: Regression labels Jun 15, 2017
@cocojoe
Copy link
Member

cocojoe commented Jun 15, 2017

@luisrudge Had this reported in ZD so I'll up vote on their behalf 😄
I did a bit of debugging to compare 10.11 and 10.12 (the breaking change).

In 10.12 the connection_scope now runs through normalizeAuthParams, when it comes to building the authorizeurl this param is no longer available to be added to the URL.

10.11
screen shot 2017-06-15 at 11 22 10

10.12+
screen shot 2017-06-15 at 11 23 30

Hope that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This points to a verified bug in the code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants