wolfeidau / cognito-vue-bootstrap

This application illustrates how to use the Amazon Amplify with vue.js.
https://github.com/wolfeidau/cognito-vue-bootstrap
Other
181 stars 36 forks source link

Social Login #9

Open marclave opened 6 years ago

marclave commented 6 years ago

Have you had any luck with social logins? More of a feature request. Was exploring cognito and tried to integrate this repo with cognito google sign in and i get the id token but at this step

    Config.credentials = new CognitoIdentityCredentials({
      IdentityPoolId: this.options.IdentityPoolId,
      Logins: {
        'accounts.google.com': googleUser.getAuthResponse().id_token
      }
    }, {
      region: this.options.region
    })

    Config.credentials.get((error) => {
      // Access AWS resources here.
     });

it sets it but isAuthenticated always returns false because this.userPool.getCurrentUser() is null

wolfeidau commented 6 years ago

This may help me fix this.

https://aws.amazon.com/about-aws/whats-new/2017/08/amazon-cognito-launches-general-availability-of-a-built-in-customizable-user-experience-for-sign-in-oauth-2-0-support-and-federation-with-facebook-login-with-amazon-google-and-saml-providers-for-user-pools/

marclave commented 6 years ago

I tried but no dice 😭