Skip to content
This repository has been archived by the owner on Jul 18, 2020. It is now read-only.

authParams applied inconsistently #9

Closed
keeth opened this issue Dec 24, 2015 · 1 comment
Closed

authParams applied inconsistently #9

keeth opened this issue Dec 24, 2015 · 1 comment

Comments

@keeth
Copy link
Contributor

keeth commented Dec 24, 2015

If I call

lock.show({})

with an empty params object, I can log in successfully.

However if I call

lock.show({authParams:{}})

or say

lock.show({authParams:{connection_scopes: {facebook: ['user_posts']}}})

authenticationParametersFromOptions() will build a parameter dictionary that is missing the 'device' item, which causes login to fail.

I need to explicitly pass in scope to make it work

lock.show({authParams:{scope: 'openid offline_access', connection_scopes: {facebook: ['user_posts']}}})

This is very confusing to a new user.

Additionally, the connection_scopes are totally ignored by A0WebViewAuthenticator - it seems that for other IDPs the params get the 'connection' property set (in registerAuthenticationProvider):

params[A0ParameterConnection] = connectionName;

But this is not set for A0WebViewAuthenticator. Subsequently, when A0WebKitViewController.initWithAPIClient is called, [parameters asAPIPayload] returns a parameter dictionary with connection_scopes missing, because it is trying to look up the connection scopes for the selected connection, but none is set.

I'll open a separate ticket on Lock.iOS as I believe this second issue is a bug in that project.

@hzalaz
Copy link
Member

hzalaz commented Dec 28, 2015

Will be fixed in auth0/Lock.swift#211

@hzalaz hzalaz closed this as completed Dec 28, 2015
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

2 participants