-
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
fix(auth): add deprecated signInDetails type to AuthTokens type #12981
Conversation
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 introduction of signInDetails
into the getCurrentUser
API ended up affecting the output of fetchAuthSession
, both APIs consume the same underlying functionality from the Amplify
singleton, and it was a miss to detect that in our tests.
The solution to the fix is actually introducing a deprecation warning, which seems totally fine to me. However we are modifying a public interface, which means that we might need to have a follow up with a BR and product.
Other than fixing this issue, ideally we might want to prevent this from happening again. So as an action item, we could add tests to detect the right number of keys expected by a given output.
This change looks good to me! |
Seems reasonable to me, as long as we document it on our API spec. Please ping @haverchuck as well. |
Looks good to me as well. API doc will be updated. |
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.
LGTM
Description of changes
fetchAuthSession
API returns "signInDetails", exampleHowever the return type of this API (AuthSession) does not have this type resulting a
signInDetails does not exist on type
errorSolution:
getCurrentUser
API to obtain signInDetailsfetchAuthSession
to avoid type errorIssue #, if available
#12868
Description of how you validated changes
Before
After
Checklist
yarn test
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.