-
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): Missing type in configure function #10045
Closed
micksatana
wants to merge
7
commits into
aws-amplify:main
from
micksatana:auth/fix-missing-configure-type
Closed
Changes from 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
612a43d
fix(auth): Missing type in configure function
micksatana fced710
docs: Update config type for configure function
micksatana 692d520
Merge branch 'main' into auth/fix-missing-configure-type
chintannp f542470
Merge branch 'main' into auth/fix-missing-configure-type
micksatana a0b5cc9
Merge branch 'main' into auth/fix-missing-configure-type
micksatana e96061e
Merge branch 'main' into auth/fix-missing-configure-type
stocaaro 771985b
Merge branch 'main' into auth/fix-missing-configure-type
stocaaro File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 would be a breaking change unfortunately.
Auth.configure
can also use the content ofaws-exports.js
file. Maybe we could do something to overload this function? @jamesaucode what do you think?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.
Hi @chrisbonifacio
Type '{}' is missing the following properties from type 'ICognitoStorage'
because the test case use{}
instead of just left it out when storage not exists. The test mentioningthrow error when storage is empty
, so it should throw and it does. When I ran test locally, it gotAnd
I'm not sure how the same test behave differently in CI though.
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.
I think the test case want to test the fail case when it's an empty object. But it conflicts with type testing as the
ICognitoStorage
type has all required properties. So to pass this test, either fix the test case to removestorage: {}
out, or make allICognitoStorage
props optional. If the test case intent to test logic not type, I think we shouldn't test with empty object (without ts-ignore). It should test withundefined
instead. Or keep the empty objectstorage
but usets-ignore
above theauth.configure(opts);
line because we intentionally make the type failed.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.
Hi @micksatana - Just wanted to give you a heads up we are planning on pushing a bunch of changes to our Authentication category, and are planning on include changes in your PR as a part of that. Just wanted to reach out to make sure you know we did not abandon your contribution.
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.
@abdallahshaban557 acknowledged with thanks.