-
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
Allow the developer to provide an identity id #665
Allow the developer to provide an identity id #665
Conversation
Codecov Report
@@ Coverage Diff @@
## master #665 +/- ##
==========================================
- Coverage 87.48% 87.47% -0.02%
==========================================
Files 74 74
Lines 3549 3553 +4
Branches 677 678 +1
==========================================
+ Hits 3105 3108 +3
- Misses 422 423 +1
Partials 22 22
Continue to review full report at Codecov.
|
Initially I thought I could split the refresh handlers (#624) and the identity id issue (referenced in this PR) into two different PR's but as I got to developing this I realized that they are both needed in order to do developer federatedSignIn's, so I've merged the two requests into one. |
// If the developer has provided an object of refresh handlers, | ||
// then we can overwrite the default blank _refreshHandlers object. | ||
if (refreshHandlers) { | ||
this._refreshHandlers = refreshHandlers; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The _refreshHandlers
is not blank by default. Can you append the refreshHanders
to that instead of overwritting it?
…veless/aws-amplify into add-identity-id-to-federated-sign-in
@powerful23 Alright, I've merged the refreshHandlers rather than overwriting them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This pull request has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
When performing a federated sign in using GetOpenIdTokenForDeveloperIdentity I receive an IdentityID and a Token from that call.
When I perform the following function call
I received the following error message.
Invalid login token. Can't pass in a Cognito token.
I found out through my research that this happens because a call to GetId happens when there is no identity id provided and the developer token that I get from GetOpenIdTokenForDeveloperIdentity is not allowed to call that method.
With my patch I can execute the following sign in.
Which bypasses the call to GetID and allows me to authenticate using GetOpenIdTokenForDeveloperIdentity
This PR allows a flow as follows.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.