CognitoIdentityCredentials params Logins key for sign In with Apple ID?
See original GitHub issueConfirm by changing [ ] to [x] below:
- I’ve gone though Developer Guide and API reference
- I’ve checked AWS Forums and StackOverflow for answers
Describe the question
What value should be used for the Logins property of the parameters required to intialize the Cognito Credentials object (CognitoIdentityCredentials) if I need to support social login for Apple ID.
AWS documentation only lists the below keys
- Facebook: graph.facebook.com
- Google: accounts.google.com
- Amazon: www.amazon.com
- Twitter: api.twitter.com
- Digits: www.digits.com
See https://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_CreateIdentityPool.html#API_CreateIdentityPool and https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CognitoIdentity.html
I can’t find what should be used for Apple ID anywhere in the AWS documentation and the aws-sdk typescript does not list it as well - see below
/**
* A set of optional name-value pairs that map provider names to provider tokens. The available provider names for Logins are as follows: Facebook: graph.facebook.com Amazon Cognito user pool: cognito-idp.<region>.amazonaws.com/<YOUR_USER_POOL_ID>, for example, cognito-idp.us-east-1.amazonaws.com/us-east-1_123456789. Google: accounts.google.com Amazon: www.amazon.com Twitter: api.twitter.com Digits: www.digits.com
*/
Logins?: LoginsMap;
My code as below (see WHAT SHOULD BE INSERTED HERE TO SUPPORT APPLE ID SOCIAL LOGIN placeholder)
// The parameters required to intialize the Cognito Credentials object.
const params = {
AccountId: awsConfig.AWS_ACCOUNT_ID,
RoleArn: awsConfig.IAM_ROLE_ARN,
IdentityPoolId: awsConfig.COGNITO_IDENTITY_POOL_ID,
Logins: { }
};
params.Logins[<WHAT SHOULD BE INSERTED HERE TO SUPPORT APPLE ID SOCIAL LOGIN>] = accessToken;
// set the Amazon Cognito region
AWS.config.region = awsConfig.AWS_REGION;
// initialize the Credentials object with our parameters
AWS.config.credentials = new AWS.CognitoIdentityCredentials(params);
(AWS.config.credentials as AWS.CognitoIdentityCredentials).get((err: AWSError) => {
if (err) {
reject(err);
}
else {
const COGNITO_IDENTITY_ID = (AWS.config.credentials as AWS.CognitoIdentityCredentials).identityId;
awsConfig.COGNITO_IDENTITY_ID = COGNITO_IDENTITY_ID;
this.share.cognitoIdentityId = COGNITO_IDENTITY_ID;
resolve();
}
});
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
CognitoIdentityCredentials params Logins key for sign In with ...
You need create Apple provider in OpenID or SAML provider if Apple support them. This is example for config Auth0 as OpenID provider...
Read more >Getting credentials - Amazon Cognito - AWS Documentation
CognitoIdentityCredentials constructor without the roles as parameters. To do so, open the Amazon Cognito console , choose Manage identity pools, select ...
Read more >Open ID Connect providers (identity pools) - Amazon Cognito
The iss parameter must match the key that the logins map uses (such as login.provider.com). · The signature must be valid. · The...
Read more >Java Integration with Amazon Cognito Developer Tutorial
Amazon Cognito is a simple user identity and data synchronization service that ... With Temporary Password: This parameter is not required, ...
Read more >Class: AWS.CognitoIdentityCredentials - API Manual
If the identity or identity pool is not configured in the Amazon Cognito Console to use ... used for authenticated login // See...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I am facing the same issue, any chance this could be implemented since Sign in Apple is available on Cognito ? Thanks 🙏🙏🙏
@ajredniwja Any estimate when the appropriate key will be supported for Login Provider?