Amplify-js: Add support for custom scopes to federated logins

Created on 16 Feb 2018  路  8Comments  路  Source: aws-amplify/amplify-js

What is the current behavior?

Scopes for federated logins are hardcoded:
Facebook: 'public_profile,email'
Google: 'profile email openid'
Amazon: 'profile'

What is the expected desired behavior?

Allow override of the defaults with new xxx_scope keys in the federated hash.

I have forked the repo and am willing to add support. Let me know if this would be welcome.

Auth feature-request help wanted pending-close-response-required

Most helpful comment

if no ones working on this id like to pick it up

All 8 comments

@ceich yeah sure that's a really good enhancement to the library.

Any update on this? Definitely something I would like added

if no ones working on this id like to pick it up

If anyone has something I can NPM install that allows for this, I would be eternally grateful.

I tried forking the library, building it with the directions in the wiki then installing it with npm to no avail. Ended up ripping out the built-in Facebook login and replacing it with https://serverless-stack.com/chapters/facebook-login-with-cognito-using-aws-amplify.html which works great.

@peetss @stephenhuh @dcsena @ceich we are looking at an enhancement for Auth.federatedSignIn() at this time which could potentially address this use case. Please see the RFC here: https://github.com/aws-amplify/amplify-js/issues/2716

I'd be interested in seeing what you expect the overloaded scope experience would look like in a more simplified API. Could you please comment in the RFC?

I ended up not using custom scopes as they are quite a pain to get approval for on Facebook in particular. However, it would still be nice to pass additional scopes in optionally. Will check out the RFC.

Is this functionality still needed with the latest updates to the CLI supporting the OAuth/Hosted UI (where you can specify scopes in the OAuth config) as well as the library supporting OAuth with federatedSignIn() or can the issue be closed?

Agree it's ok to close.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

callmekatootie picture callmekatootie  路  3Comments

epicfaace picture epicfaace  路  3Comments

ldgarcia picture ldgarcia  路  3Comments

DougWoodCDS picture DougWoodCDS  路  3Comments

karlmosenbacher picture karlmosenbacher  路  3Comments