I am using firebase for google authentication, i followed all the steps mentioned in the latest video of the firebase google authentication, but the activity result shows success but i cannot access to the details of the signed in user, it shows null
Related
In my app, user can add their Facebook profile link. But I don't want to add the user's Facebook profile link without verifying it.
I can get the user's verified Facebook profile link from LoginManager.logInWithPermissions(["user_link"] using react-native-fbsdk-next package. But I don't want to log in using Facebook since the user already signed in using google or any other way in my app.
Lately I started looking into PoC with Auth0 for our use case where we want to allow users to login with Google and Facebook, also want Guest user to login and access our API and once guest user choose to login with Google and Facebook then we can link guest user so that their data will be served once logout.
Here's the things which I am to able to do till now with PoC:
Able to Login with Google and Facebook through client App.
Access authenticated API after getting bearer token from client App.
Things which still need to do, I tried to search but couldn't found good resource:
I want user to login as Guest user and latter if they want they can login with Google/FB and link their account.
Also, I am looking into Rest login API in Auth0 so that we can hit login API after getting access token from Google/FB and register user into Auth0 and get the token for API access.
It would be great if anyone help me on above two points. Thanks!
I'd like to confirm if what I observed is correct with regards to Amazon Cognito User Pools and Amplify, specially with the bold text:
A user pool is a user directory in Amazon Cognito. With a user pool,
your users can sign in to your web or mobile app through Amazon
Cognito. Your users can also sign in through social identity providers
like Google, Facebook, Amazon, or Apple, and through SAML identity
providers. Whether your users sign in directly or through a third
party, all members of the user pool have a directory profile that you
can access through a Software Development Kit (SDK).
So far I have set-up in an amplify app:
Email/Password Sign-up/Sign-in (used amplify add auth with username as email)
Google and Facebook social federation (used amplify update auth)
What I Expect:
I'll be able to create a new account (CognitoUser) with email myemail#gmail.com using email/password sign-up. (myemail#gmail.com hasn't been registered yet or associated with any social federation sign-ins).
A new CognitoUser account will not be created if I Google Sign-in using the Google email myemail#gmail.com. Instead, I will be presented with the account/CognitoUser that I confirmed from #1 after Google sign-in.
Whether your users sign in directly or through a third party, all
members of the user pool have a directory profile that you can access
through a Software Development Kit (SDK).
What I Get/Observations:
I seem to get (2) unique Cognito Users each for the email/password sign-in and Google Sign-in methods. (Please see the attached CognitoUser Logs screenshots below)
My Questions:
If I first signed-up an email (myemail#gmail.com) using email/password, do I get (2) unique Cognito Users if I sign-in again using a Google (or Facebook account) that uses the same email myemail#gmail.com?
If (2) CognitoUsers are created for the same email,
How do I prevent a new CognitoUser creation for Google Sign-in when the email has already been registered using email/password and vice-versa?
Is it possible to reuse the CognitoUser from an email/password sign-in on a Google sign-in of the same email?
If [2.1] cannot be prevented, how can serverside data be best managed for the 2 CognitoUsers (that share the same email myemail#gmail.com)
TIA for your insights and advice!
CognitoUser Logs
CognitoUser from email/password sign-in (myemail#gmail.com):
CognitoUser from Google Sign-in (Auth.federatedSignIn({provider: 'Google'})). Google email is myemail#gmail.com:
I have an app that uses Google login as one of the modes for login/signup the users in the app. Unfortunately, I missed saving the user-id received after logging-in using Google, and therefore, I can't seem to find the users who have used Google for creating the account on my app.
Is there a way I can track the count of the users who has used the Google login using the client-id Google provides while integrating the Google login button?
I followed the Firebase documentation to implement multiple authentication providers (Google and Facebook), and I am with the problem that I do not know how to solve.
Assuming my new User has Google providers and facebook with different emails is possible to perform the following login flow ?.
User enters the first app and resolves login with your Google account
Firebase create an account and link Google her provider.
The user exits the application.
User again performs login to the app, however this time he chooses the Facebook provider (which has different email Google).
firebase links the Facebook provider the account that is already linked to Google provider.
The Firebase documentation has a complete page dedicated to account linking. The samples in the page link to a Github repo where you can see the code in the context of an entire app that demonstrates it.
There's little use in use replicating the documentation here. If you're having trouble making a specific step work, share what you've done and the minimal code that shows where you are stuck.