-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Login using Identity Provider i.e Google #542
Comments
@powerful23 thank you very much. But I still facing problems. Here I will type the parts of signing-in using the google account and please correct me if there is error.
then
then
I do not know why I got Do you have a complete example or idea, let me know about your inspiration. regard. |
@engharb There are two "pool" in Cognito: User pool and Identity pool. From the code you provided I think you are actually using Google OpenId to get a federated identity from the Identity Pool. If you want to login in that way, you can either use aws-amplify or write your own code. You can have look at this implementation which may give you some help. |
@powerful23 |
The Briefly Cognito user pool is just a pool of registered users where you can manage them and identity pool is where the is a pool of authenticated and unauthenticated identities. The source of identities can either be from user pool, or from external provider like Google or Facebook. Another feature is Cognito OAuth which could enable users to map Google users to Cognito userpool so they can bring external users into their own user pool You can check Cognito's doc |
@powerful23 regards, |
@engharb yeah it's a bit trivial to figure all the things out. That's why we are developing AWS Amplify as well as Awsmobile CLI to make life much easier for developers. Currently we are working on to integrate the Cognito hosted UI into our library and give users detailed documentation about how to setup with those stuff and that won't be too far. Thanks for your feedback! |
@powerful23 Thanks a lot for details. But I have another Idea and I do not know if it works. I tried to get the IdentityId of unauthenticated Facebook on AWS-External-provider and then call
Do you have any Idea if that does work or not? regards, |
@engharb I am not sure as I didn't try this way to get the credentials. But can you make sure |
@powerful23 yes it is instance of it. |
@powerful23 I would expect when I call
to get a sessionKey contains the three different key, id/access/refreshTokenkey, but unfortunately I do not. |
@engharb that's because the credentials is not loaded at the time when it is constructed. You need to call |
@powerful23 I also tried
the result contains the identityId with expired:true ????! |
@engharb hmm.. Maybe try
|
@powerful23 But I can not automatically create a user or Bind the fb_logged_in user user in Cognito_User_Pool. I tried to follow this issue but no more chance amazon-archives/amazon-cognito-identity-js#608. Do you have any suggestions? |
@engharb Yeah I think this is because you are actually creating a federated identity in your identity pool and getting its credential. To bind federated users into your User Pool, you need to setup your web client and identity provider in your user pool console and use Cognito Hosted UI feature. We are working on this feature and there will be a detailed doc on it. I will notify you once it's in our beta version. |
@itrestian @powerful23 if yes, How? regards. |
@powerful23 I want to integrate/install Aws-Amplify and use hosted UI in my Ionic mobile project. Project src/Assest contains the following files: I have run
those two constants values must be i.e.
in order to solve problem from angular transpile.js The goal is: regards, |
@powerful23, you mention adding support for Cognito Hosted UI. Is there an issue tracking this feature? I would be interested in being able to use this. |
@dhumeniuk It has been merged in master branch but not published yet. We are going to publish a beta version this week. |
@powerful23 thanks a lot for your help and responses. I am eagerly looking for the coming feature utilizing hosted UI (especially in social login). and regarding to the sample that you announced I have successfully configured and implemented the complete login process for our Mobile App and Web App using aws-cognito-sdk.js BUT what still missing is concreted example of how to use the UI (in Mobile/Web app) example?. Now I am thinking weather to use Do you advance me to use regards, |
@powerful23 I am sorry for asking you frequently. I am able to use
The result consists of accessKeyId, sessionToken .... The Question : I think such a function is needed to be implemented or workaround? regards, |
@engharb I would recommend you to try Aws Amplify as it is designed to provide high level Api for developers. The |
@powerful23 Hey there, thanx for actively helping out. In Cordova apps, we cannot use the Cognito hosted UI for Google auth. What is the recommended approach for auth with Google? I went this route with no success. |
@Birowsky if you only want to get a valid AWS credential from Cognito Federated Identity Pool, then |
@powerful23 ah, no, I need to end up with a session from a user pool, not an identity pool. Any input there? I use the user pool hosted ui for the web version of the app. Works nicely. But in Cordova, Google has banned use of the inapp browser, so we have to go with their native flow, which leaves me hanging in terms of how do I utilize the google auth response. |
@Birowsky that's beyond my knowledge. @yuntuowang do you know how to sign Google users into user pool through native flow? |
Hi @Birowsky, we haven't supported this feature yet. It is on our roadmap. Thanks! |
@yuntuowang oh dear.. just spent a day on it :} Good to know it's being considered. Where do I track progress on it? Any vague estimation? Or.. should I ask.. is there nothing I can do by use of the TOKEN or AUTHORIZATION endpoints? |
It is hard to comment on the delivery time at this point. Once this feature is released, I will post on this issue! TOKEN and AUTHORIZATION endpoints are for cognito flows. |
For anyone interested, I logged the Google auth in Cordova issue here. Let's hope for results as soon as possible. Have a good one! |
@yuntuowang I hope that I will be confirmed about the coming features. Is there a way to decode and verify the Identity-Pool sessionToken using i.e PHP-SDK? I solved that for user-pool JWT but not for Identity-pool sessionToken!. |
Hi @powerful23 , Hope you are doing good, Can you please help to implement the same using |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
I still using aws/amazon-cognito-identity-js.
I want to login in my Mobile App to Cognito Pool using i.e my google credentials. When I logged in successfully using my google account I call the following code
the result: IdentifierId is null.
Question:
How can I authenticate my current google account to AWS-Cognito-Pool?
Thanks
The text was updated successfully, but these errors were encountered: