Skip to content
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

chore!: remove deprecated auth types #4764

Merged
merged 2 commits into from
Apr 25, 2024

Conversation

Jordan-Nelson
Copy link
Member

@Jordan-Nelson Jordan-Nelson commented Apr 23, 2024

Issue #, if available:

Description of changes:

  • Removes deprecated auth types

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Jordan-Nelson Jordan-Nelson force-pushed the chore/auth/remove-deprecated-types branch from 8d66d80 to e975914 Compare April 23, 2024 15:09
@Jordan-Nelson Jordan-Nelson marked this pull request as ready for review April 23, 2024 19:57
@Jordan-Nelson Jordan-Nelson requested a review from a team as a code owner April 23, 2024 19:57
Comment on lines -59 to -67
/// The default flow used to sign in.
late final AuthFlowType defaultAuthFlowType = () {
// Get the flow from the plugin config
final pluginFlowType =
expect<CognitoPluginConfig>().auth?.default$?.authenticationFlowType ??
AuthenticationFlowType.userSrpAuth;
return pluginFlowType.sdkValue;
}();

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I acknowledge that this field is not present in CLI Gen2. However, with these modifications, we are bypassing the configuration value for users who are still using CLI Gen1.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is correct. Customers can specify this via SignInOptions though.

The current behavior is to use the value from SignInOptions if it exists. If not, use the value from the config if it exists. If neither exist, AuthenticationFlowType.userSrpAuth is the default.

The new behavior is to use the value from SignInOptions if it exists. If not, AuthenticationFlowType.userSrpAuth is the default.

It is a breaking change that will be called out in the change log for v2.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we may need to add a note in our Gen1/V2 documentation indicating the value from the configuration file is not used by the library. Instead, users should use the SignInOptions.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I meant to say this will be called out in the migration guide

Equartey
Equartey previously approved these changes Apr 24, 2024
NikaHsn
NikaHsn previously approved these changes Apr 24, 2024
@Jordan-Nelson Jordan-Nelson dismissed stale reviews from NikaHsn and Equartey via c99eb94 April 24, 2024 18:03
@Jordan-Nelson Jordan-Nelson force-pushed the chore/auth/remove-deprecated-types branch from c67ed08 to c99eb94 Compare April 24, 2024 18:03
@Jordan-Nelson Jordan-Nelson merged commit d0e827a into main Apr 25, 2024
155 checks passed
@Jordan-Nelson Jordan-Nelson deleted the chore/auth/remove-deprecated-types branch April 25, 2024 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants