From d167f667d37f579f5028f0e6a8b9d005ac5aa718 Mon Sep 17 00:00:00 2001 From: Abhash Kumar Singh Date: Thu, 13 Nov 2025 13:39:16 -0800 Subject: [PATCH 1/9] feat(auth): add support for cognito oidc parameters in managed login --- .../hosted_ui/hosted_ui_platform_flutter.dart | 5 ++ .../lib/src/native_auth_plugin.g.dart | 10 +++ .../auth/amplify_auth_cognito/pubspec.yaml | 3 +- .../lib/amplify_auth_cognito_dart.dart | 1 + .../src/flows/hosted_ui/hosted_ui_config.dart | 14 +++- .../flows/hosted_ui/hosted_ui_platform.dart | 6 +- .../hosted_ui/hosted_ui_platform_html.dart | 2 +- .../hosted_ui/hosted_ui_platform_io.dart | 1 + ...to_sign_in_with_web_ui_plugin_options.dart | 42 +++++++++++- ..._in_with_web_ui_plugin_options_prompt.dart | 38 +++++++++++ .../amplify_auth_cognito_test/pubspec.yaml | 3 +- .../state/hosted_ui_state_machine_test.dart | 64 +++++++++++++++++++ 12 files changed, 182 insertions(+), 7 deletions(-) create mode 100644 packages/auth/amplify_auth_cognito_dart/lib/src/model/signin/cognito_sign_in_with_web_ui_plugin_options_prompt.dart diff --git a/packages/auth/amplify_auth_cognito/lib/src/flows/hosted_ui/hosted_ui_platform_flutter.dart b/packages/auth/amplify_auth_cognito/lib/src/flows/hosted_ui/hosted_ui_platform_flutter.dart index c16063c89d3..65a010d8d5b 100644 --- a/packages/auth/amplify_auth_cognito/lib/src/flows/hosted_ui/hosted_ui_platform_flutter.dart +++ b/packages/auth/amplify_auth_cognito/lib/src/flows/hosted_ui/hosted_ui_platform_flutter.dart @@ -94,6 +94,11 @@ class HostedUiPlatformImpl extends io.HostedUiPlatformImpl { signInRedirectUri.scheme, options.isPreferPrivateSession, options.browserPackageName, + options.nonce, + options.language, + options.loginHint, + options.prompt?.map((obj) => obj.value).toList(), + options.resource ); dispatcher .dispatch( diff --git a/packages/auth/amplify_auth_cognito/lib/src/native_auth_plugin.g.dart b/packages/auth/amplify_auth_cognito/lib/src/native_auth_plugin.g.dart index 3da9bd734fc..e3bb6a94bc8 100644 --- a/packages/auth/amplify_auth_cognito/lib/src/native_auth_plugin.g.dart +++ b/packages/auth/amplify_auth_cognito/lib/src/native_auth_plugin.g.dart @@ -376,6 +376,11 @@ class NativeAuthBridge { String callbackUrlScheme, bool preferPrivateSession, String? browserPackageName, + String? nonce, + String? language, + String? loginHint, + List? prompt, + String? resource ) async { final String pigeonVar_channelName = 'dev.flutter.pigeon.amplify_auth_cognito.NativeAuthBridge.signInWithUrl$pigeonVar_messageChannelSuffix'; @@ -391,6 +396,11 @@ class NativeAuthBridge { callbackUrlScheme, preferPrivateSession, browserPackageName, + nonce, + language, + loginHint, + prompt, + resource ], ); final List? pigeonVar_replyList = diff --git a/packages/auth/amplify_auth_cognito/pubspec.yaml b/packages/auth/amplify_auth_cognito/pubspec.yaml index 0730ded28ba..5f99b0fd79a 100644 --- a/packages/auth/amplify_auth_cognito/pubspec.yaml +++ b/packages/auth/amplify_auth_cognito/pubspec.yaml @@ -21,7 +21,8 @@ platforms: dependencies: amplify_analytics_pinpoint: ">=2.7.0 <2.8.0" amplify_analytics_pinpoint_dart: ">=0.4.12 <0.5.0" - amplify_auth_cognito_dart: ">=0.11.14 <0.12.0" + amplify_auth_cognito_dart: + path: ../amplify_auth_cognito_dart amplify_core: ">=2.7.0 <2.8.0" amplify_flutter: ">=2.7.0 <2.8.0" amplify_secure_storage: ">=0.5.13 <0.6.0" diff --git a/packages/auth/amplify_auth_cognito_dart/lib/amplify_auth_cognito_dart.dart b/packages/auth/amplify_auth_cognito_dart/lib/amplify_auth_cognito_dart.dart index 32f86bdeb21..3d614ddb63b 100644 --- a/packages/auth/amplify_auth_cognito_dart/lib/amplify_auth_cognito_dart.dart +++ b/packages/auth/amplify_auth_cognito_dart/lib/amplify_auth_cognito_dart.dart @@ -40,6 +40,7 @@ export 'src/model/signin/cognito_confirm_sign_in_plugin_options.dart'; export 'src/model/signin/cognito_sign_in_plugin_options.dart'; export 'src/model/signin/cognito_sign_in_result.dart'; export 'src/model/signin/cognito_sign_in_with_web_ui_plugin_options.dart'; +export 'src/model/signin/cognito_sign_in_with_web_ui_plugin_options_prompt.dart'; export 'src/model/signout/cognito_sign_out_plugin_options.dart'; export 'src/model/signout/cognito_sign_out_result.dart'; export 'src/model/signup/cognito_confirm_sign_up_plugin_options.dart'; diff --git a/packages/auth/amplify_auth_cognito_dart/lib/src/flows/hosted_ui/hosted_ui_config.dart b/packages/auth/amplify_auth_cognito_dart/lib/src/flows/hosted_ui/hosted_ui_config.dart index e51d1594fca..e86df002653 100644 --- a/packages/auth/amplify_auth_cognito_dart/lib/src/flows/hosted_ui/hosted_ui_config.dart +++ b/packages/auth/amplify_auth_cognito_dart/lib/src/flows/hosted_ui/hosted_ui_config.dart @@ -1,6 +1,7 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 +import 'package:amplify_auth_cognito_dart/amplify_auth_cognito_dart.dart'; import 'package:amplify_core/amplify_core.dart'; // ignore: implementation_imports import 'package:amplify_core/src/config/amplify_outputs/auth/oauth_outputs.dart'; @@ -26,7 +27,7 @@ extension HostedUiConfig on OAuthOutputs { /// References: /// - https://docs.aws.amazon.com/cognito/latest/developerguide/authorization-endpoint.html /// - https://docs.aws.amazon.com/cognito/latest/developerguide/login-endpoint.html - Uri signInUri([AuthProvider? provider]) { + Uri signInUri([AuthProvider? provider, CognitoSignInWithWebUIPluginOptions? options]) { Uri baseUri; // ignore: invalid_use_of_internal_member if (this.signInUri != null) { @@ -35,9 +36,20 @@ extension HostedUiConfig on OAuthOutputs { } else { baseUri = _webDomain.replace(path: '/oauth2/authorize'); } + + final nonce = options?.nonce; + final language = options?.language; + final loginHint = options?.loginHint; + final prompt = options?.prompt?.map((obj) => obj.value).toList().join(' '); + final resource = options?.resource; return baseUri.replace( queryParameters: { if (provider != null) 'identity_provider': provider.uriParameter, + if (nonce != null) 'nonce': nonce, + if (language != null) 'lang': language, + if (loginHint != null) 'login_hint': loginHint, + if (prompt != null) 'prompt': prompt, + if (resource != null) 'resource': resource, // ignore: invalid_use_of_internal_member ...?signInUriQueryParameters, }, diff --git a/packages/auth/amplify_auth_cognito_dart/lib/src/flows/hosted_ui/hosted_ui_platform.dart b/packages/auth/amplify_auth_cognito_dart/lib/src/flows/hosted_ui/hosted_ui_platform.dart index f826494b962..1d27513d434 100644 --- a/packages/auth/amplify_auth_cognito_dart/lib/src/flows/hosted_ui/hosted_ui_platform.dart +++ b/packages/auth/amplify_auth_cognito_dart/lib/src/flows/hosted_ui/hosted_ui_platform.dart @@ -102,7 +102,7 @@ abstract class HostedUiPlatform implements Closeable { @protected @visibleForTesting @nonVirtual - Future getSignInUri({Uri? redirectUri, AuthProvider? provider}) async { + Future getSignInUri({Uri? redirectUri, AuthProvider? provider, CognitoSignInWithWebUIPluginOptions? options}) async { final state = generateState(); final codeVerifier = createCodeVerifier(); @@ -124,6 +124,7 @@ abstract class HostedUiPlatform implements Closeable { codeVerifier: codeVerifier, httpClient: httpClient, provider: provider, + options: options ); final uri = _authCodeGrant!.getAuthorizationUrl( redirectUri ?? signInRedirectUri, @@ -162,12 +163,13 @@ abstract class HostedUiPlatform implements Closeable { String userPoolClientId, { String? appClientSecret, AuthProvider? provider, + CognitoSignInWithWebUIPluginOptions? options, String? codeVerifier, http.Client? httpClient, }) { return oauth2.AuthorizationCodeGrant( userPoolClientId, - HostedUiConfig(authOutputs.oauth!).signInUri(provider), + HostedUiConfig(authOutputs.oauth!).signInUri(provider, options), HostedUiConfig(authOutputs.oauth!).tokenUri, secret: appClientSecret, httpClient: httpClient, diff --git a/packages/auth/amplify_auth_cognito_dart/lib/src/flows/hosted_ui/hosted_ui_platform_html.dart b/packages/auth/amplify_auth_cognito_dart/lib/src/flows/hosted_ui/hosted_ui_platform_html.dart index 6a4d30f067f..da90383c131 100644 --- a/packages/auth/amplify_auth_cognito_dart/lib/src/flows/hosted_ui/hosted_ui_platform_html.dart +++ b/packages/auth/amplify_auth_cognito_dart/lib/src/flows/hosted_ui/hosted_ui_platform_html.dart @@ -54,7 +54,7 @@ class HostedUiPlatformImpl extends HostedUiPlatform { required CognitoSignInWithWebUIPluginOptions options, AuthProvider? provider, }) async { - final signInUrl = (await getSignInUri(provider: provider)).toString(); + final signInUrl = (await getSignInUri(provider: provider, options: options)).toString(); await launchUrl(signInUrl); } diff --git a/packages/auth/amplify_auth_cognito_dart/lib/src/flows/hosted_ui/hosted_ui_platform_io.dart b/packages/auth/amplify_auth_cognito_dart/lib/src/flows/hosted_ui/hosted_ui_platform_io.dart index ad144a37160..446528abfba 100644 --- a/packages/auth/amplify_auth_cognito_dart/lib/src/flows/hosted_ui/hosted_ui_platform_io.dart +++ b/packages/auth/amplify_auth_cognito_dart/lib/src/flows/hosted_ui/hosted_ui_platform_io.dart @@ -216,6 +216,7 @@ class HostedUiPlatformImpl extends HostedUiPlatform { try { final signInUrl = (await getSignInUri( provider: provider, + options: options, redirectUri: localServer.uri, )).toString(); await launchUrl(signInUrl); diff --git a/packages/auth/amplify_auth_cognito_dart/lib/src/model/signin/cognito_sign_in_with_web_ui_plugin_options.dart b/packages/auth/amplify_auth_cognito_dart/lib/src/model/signin/cognito_sign_in_with_web_ui_plugin_options.dart index 953a3e1f203..9bd04aa3e42 100644 --- a/packages/auth/amplify_auth_cognito_dart/lib/src/model/signin/cognito_sign_in_with_web_ui_plugin_options.dart +++ b/packages/auth/amplify_auth_cognito_dart/lib/src/model/signin/cognito_sign_in_with_web_ui_plugin_options.dart @@ -1,6 +1,7 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 +import 'package:amplify_auth_cognito_dart/src/model/signin/cognito_sign_in_with_web_ui_plugin_options_prompt.dart'; import 'package:amplify_core/amplify_core.dart'; part 'cognito_sign_in_with_web_ui_plugin_options.g.dart'; @@ -14,6 +15,11 @@ class CognitoSignInWithWebUIPluginOptions extends SignInWithWebUIPluginOptions { const CognitoSignInWithWebUIPluginOptions({ this.isPreferPrivateSession = false, this.browserPackageName, + this.nonce, + this.language, + this.loginHint, + this.prompt, + this.resource }); /// {@macro amplify_auth_cognito.model.cognito_sign_in_with_web_ui_plugin_options} @@ -40,8 +46,42 @@ class CognitoSignInWithWebUIPluginOptions extends SignInWithWebUIPluginOptions { /// {@endtemplate} final String? browserPackageName; + /// {@template amplify_auth_cognito.model.cognito_sign_in_with_web_ui_options.nonce} + /// A random value that you can add to the request. The nonce value that you provide is included in the ID token + /// that Amazon Cognito issues. To guard against replay attacks, your app can inspect the nonce claim in the ID + /// token and compare it to the one you generated. + /// {@endtemplate} + final String? nonce; + + /// {@template amplify_auth_cognito.model.cognito_sign_in_with_web_ui_options.language} + /// The language that you want to display user-interactive pages in + /// For more information, see Managed login localization - + /// https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-managed-login.html#managed-login-localization + /// {@endtemplate} + final String? language; + + /// {@template amplify_auth_cognito.model.cognito_sign_in_with_web_ui_options.loginHint} + /// A username prompt that you want to pass to the authorization server. You can collect a username, email + /// address or phone number from your user and allow the destination provider to pre-populate the user's + /// sign-in name. + /// {@endtemplate} + final String? loginHint; + + /// {@template amplify_auth_cognito.model.cognito_sign_in_with_web_ui_options.prompt} + /// An OIDC parameter that controls authentication behavior for existing sessions. + /// {@endtemplate} + final List? prompt; + + /// {@template amplify_auth_cognito.model.cognito_sign_in_with_web_ui_options.resource} + /// The identifier of a resource that you want to bind to the access token in the `aud` claim. When you include + /// this parameter, Amazon Cognito validates that the value is a URL and sets the audience of the resulting + /// access token to the requested resource. Values for this parameter must begin with "https://", "http://localhost", + /// or a custom URL scheme like "myapp://". + /// {@endtemplate} + final String? resource; + @override - List get props => [isPreferPrivateSession, browserPackageName]; + List get props => [isPreferPrivateSession, browserPackageName, nonce, language, loginHint, prompt, resource]; @override String get runtimeTypeName => 'CognitoSignInWithWebUIPluginOptions'; diff --git a/packages/auth/amplify_auth_cognito_dart/lib/src/model/signin/cognito_sign_in_with_web_ui_plugin_options_prompt.dart b/packages/auth/amplify_auth_cognito_dart/lib/src/model/signin/cognito_sign_in_with_web_ui_plugin_options_prompt.dart new file mode 100644 index 00000000000..588719c226d --- /dev/null +++ b/packages/auth/amplify_auth_cognito_dart/lib/src/model/signin/cognito_sign_in_with_web_ui_plugin_options_prompt.dart @@ -0,0 +1,38 @@ +import 'package:json_annotation/json_annotation.dart'; + +/// {@macro amplify_auth_cognito.model.cognito_sign_in_with_web_ui_options.prompt} +enum CognitoSignInWithWebUIPrompt { + /// Amazon Cognito silently continues authentication for users who have a valid authenticated session. + /// With this prompt, users can silently authenticate between different app clients in your user pool. + /// If the user is not already authenticated, the authorization server returns a login_required error. + @JsonValue('none') + none('none'), + + /// Amazon Cognito requires users to re-authenticate even if they have an existing session. Send this + /// value when you want to verify the user's identity again. Authenticated users who have an existing + /// session can return to sign-in without invalidating that session. When a user who has an existing + /// session signs in again, Amazon Cognito assigns them a new session cookie. This parameter can also + /// be forwarded to your IdPs. IdPs that accept this parameter also request a new authentication + /// attempt from the user. + @JsonValue('login') + login('login'), + + /// This value has no effect on local sign-in and must be submitted in requests that redirect to IdPs. + /// When included in your authorization request, this parameter adds prompt=select_account to the URL + /// path for the IdP redirect destination. When IdPs support this parameter, they request that users + /// select the account that they want to log in with. + @JsonValue('select_account') + selectAccount('select_account'), + + /// This value has no effect on local sign-in and must be submitted in requests that redirect to IdPs. + /// When included in your authorization request, this parameter adds prompt=consent to the URL path for + /// the IdP redirect destination. When IdPs support this parameter, they request user consent before + /// they redirect back to your user pool. + @JsonValue('consent') + consent('consent'); + + const CognitoSignInWithWebUIPrompt(this.value); + + /// String value for the enumeration + final String value; +} diff --git a/packages/auth/amplify_auth_cognito_test/pubspec.yaml b/packages/auth/amplify_auth_cognito_test/pubspec.yaml index a7b7ee33844..42ecbfccab5 100644 --- a/packages/auth/amplify_auth_cognito_test/pubspec.yaml +++ b/packages/auth/amplify_auth_cognito_test/pubspec.yaml @@ -7,7 +7,8 @@ environment: dependencies: amplify_analytics_pinpoint_dart: any - amplify_auth_cognito_dart: any + amplify_auth_cognito_dart: + path: ../amplify_auth_cognito_dart amplify_core: any amplify_secure_storage_dart: any async: ^2.10.0 diff --git a/packages/auth/amplify_auth_cognito_test/test/state/hosted_ui_state_machine_test.dart b/packages/auth/amplify_auth_cognito_test/test/state/hosted_ui_state_machine_test.dart index 1781ed63f8b..2f724d19626 100644 --- a/packages/auth/amplify_auth_cognito_test/test/state/hosted_ui_state_machine_test.dart +++ b/packages/auth/amplify_auth_cognito_test/test/state/hosted_ui_state_machine_test.dart @@ -562,6 +562,70 @@ void main() { stateMachine.dispatch(const HostedUiEvent.signOut()).ignore(); }); + + test('preserves oidc parameters', () async { + stateMachine + ..addBuilder( + createHostedUiFactory( + signIn: + ( + HostedUiPlatform platform, + CognitoSignInWithWebUIPluginOptions options, + AuthProvider? provider, + ) async { + final signInUrl = await platform.getSignInUri( + provider: provider, + options: options + ); + _launchUrl.complete(signInUrl); + }, + signOut: expectAsync2((platform, options) async { + expect(options.isPreferPrivateSession, isTrue); + expect(options.nonce == 'nonce', isTrue); + expect(options.language == 'en', isTrue); + expect(options.loginHint == 'username', isTrue); + expect(options.prompt?.contains(CognitoSignInWithWebUIPrompt.login), isTrue); + expect(options.prompt?.contains(CognitoSignInWithWebUIPrompt.consent), isTrue); + expect(options.resource == 'myapp://', isTrue); + }), + ), + ) + ..dispatch(ConfigurationEvent.configure(mockConfig)).ignore(); + + await expectLater( + stateMachine.stream.whereType(), + emitsInOrder([ + isA(), + isA(), + ]), + ); + + stateMachine + .dispatch( + const HostedUiEvent.signIn( + options: CognitoSignInWithWebUIPluginOptions( + nonce: 'nonce', + language: 'en', + loginHint: 'username', + prompt: [CognitoSignInWithWebUIPrompt.login, CognitoSignInWithWebUIPrompt.consent], + resource: 'myapp://' + ), + ), + ) + .ignore(); + final params = await server.authorize(await _launchUrl.future); + stateMachine.dispatch(HostedUiEvent.exchange(params)).ignore(); + + await expectLater( + stateMachine.stream.whereType(), + emitsInOrder([ + isA(), + isA(), + ]), + ); + + stateMachine.dispatch(const HostedUiEvent.signOut()).ignore(); + }); }); }); } From bc6f0a9af47ba2a87cd069dadfb9c20370344e43 Mon Sep 17 00:00:00 2001 From: Abhash Kumar Singh Date: Thu, 13 Nov 2025 13:53:24 -0800 Subject: [PATCH 2/9] fix failing test build --- .../test/hosted_ui_platform_flutter_test.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/auth/amplify_auth_cognito/test/hosted_ui_platform_flutter_test.dart b/packages/auth/amplify_auth_cognito/test/hosted_ui_platform_flutter_test.dart index 03dc293862c..4c974c88393 100644 --- a/packages/auth/amplify_auth_cognito/test/hosted_ui_platform_flutter_test.dart +++ b/packages/auth/amplify_auth_cognito/test/hosted_ui_platform_flutter_test.dart @@ -83,6 +83,11 @@ final class ThrowingNativeBridge extends Fake implements NativeAuthBridge { String arg_callbackUrlScheme, bool arg_preferPrivateSession, String? arg_browserPackageName, + String? arg_nonce, + String? arg_language, + String? arg_loginHint, + List? arg_prompt, + String? arg_resource ) async { throw PlatformException(code: 'CANCELLED'); } From f117765e726a50650ba593135b7874b3c9a100f6 Mon Sep 17 00:00:00 2001 From: Abhash Kumar Singh Date: Thu, 13 Nov 2025 14:59:07 -0800 Subject: [PATCH 3/9] fix format errors --- .../hosted_ui/hosted_ui_platform_flutter.dart | 2 +- .../lib/src/native_auth_plugin.g.dart | 27 +++++++++---------- .../test/hosted_ui_platform_flutter_test.dart | 2 +- .../src/flows/hosted_ui/hosted_ui_config.dart | 5 +++- .../flows/hosted_ui/hosted_ui_platform.dart | 8 ++++-- .../hosted_ui/hosted_ui_platform_html.dart | 5 +++- ...to_sign_in_with_web_ui_plugin_options.dart | 14 +++++++--- .../state/hosted_ui_state_machine_test.dart | 21 +++++++++++---- 8 files changed, 56 insertions(+), 28 deletions(-) diff --git a/packages/auth/amplify_auth_cognito/lib/src/flows/hosted_ui/hosted_ui_platform_flutter.dart b/packages/auth/amplify_auth_cognito/lib/src/flows/hosted_ui/hosted_ui_platform_flutter.dart index 65a010d8d5b..ed2faa2d28b 100644 --- a/packages/auth/amplify_auth_cognito/lib/src/flows/hosted_ui/hosted_ui_platform_flutter.dart +++ b/packages/auth/amplify_auth_cognito/lib/src/flows/hosted_ui/hosted_ui_platform_flutter.dart @@ -98,7 +98,7 @@ class HostedUiPlatformImpl extends io.HostedUiPlatformImpl { options.language, options.loginHint, options.prompt?.map((obj) => obj.value).toList(), - options.resource + options.resource, ); dispatcher .dispatch( diff --git a/packages/auth/amplify_auth_cognito/lib/src/native_auth_plugin.g.dart b/packages/auth/amplify_auth_cognito/lib/src/native_auth_plugin.g.dart index e3bb6a94bc8..463fc005a79 100644 --- a/packages/auth/amplify_auth_cognito/lib/src/native_auth_plugin.g.dart +++ b/packages/auth/amplify_auth_cognito/lib/src/native_auth_plugin.g.dart @@ -380,7 +380,7 @@ class NativeAuthBridge { String? language, String? loginHint, List? prompt, - String? resource + String? resource, ) async { final String pigeonVar_channelName = 'dev.flutter.pigeon.amplify_auth_cognito.NativeAuthBridge.signInWithUrl$pigeonVar_messageChannelSuffix'; @@ -390,19 +390,18 @@ class NativeAuthBridge { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [ - url, - callbackUrlScheme, - preferPrivateSession, - browserPackageName, - nonce, - language, - loginHint, - prompt, - resource - ], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel + .send([ + url, + callbackUrlScheme, + preferPrivateSession, + browserPackageName, + nonce, + language, + loginHint, + prompt, + resource, + ]); final List? pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { diff --git a/packages/auth/amplify_auth_cognito/test/hosted_ui_platform_flutter_test.dart b/packages/auth/amplify_auth_cognito/test/hosted_ui_platform_flutter_test.dart index 4c974c88393..260bf9e5a62 100644 --- a/packages/auth/amplify_auth_cognito/test/hosted_ui_platform_flutter_test.dart +++ b/packages/auth/amplify_auth_cognito/test/hosted_ui_platform_flutter_test.dart @@ -87,7 +87,7 @@ final class ThrowingNativeBridge extends Fake implements NativeAuthBridge { String? arg_language, String? arg_loginHint, List? arg_prompt, - String? arg_resource + String? arg_resource, ) async { throw PlatformException(code: 'CANCELLED'); } diff --git a/packages/auth/amplify_auth_cognito_dart/lib/src/flows/hosted_ui/hosted_ui_config.dart b/packages/auth/amplify_auth_cognito_dart/lib/src/flows/hosted_ui/hosted_ui_config.dart index e86df002653..03679362188 100644 --- a/packages/auth/amplify_auth_cognito_dart/lib/src/flows/hosted_ui/hosted_ui_config.dart +++ b/packages/auth/amplify_auth_cognito_dart/lib/src/flows/hosted_ui/hosted_ui_config.dart @@ -27,7 +27,10 @@ extension HostedUiConfig on OAuthOutputs { /// References: /// - https://docs.aws.amazon.com/cognito/latest/developerguide/authorization-endpoint.html /// - https://docs.aws.amazon.com/cognito/latest/developerguide/login-endpoint.html - Uri signInUri([AuthProvider? provider, CognitoSignInWithWebUIPluginOptions? options]) { + Uri signInUri([ + AuthProvider? provider, + CognitoSignInWithWebUIPluginOptions? options, + ]) { Uri baseUri; // ignore: invalid_use_of_internal_member if (this.signInUri != null) { diff --git a/packages/auth/amplify_auth_cognito_dart/lib/src/flows/hosted_ui/hosted_ui_platform.dart b/packages/auth/amplify_auth_cognito_dart/lib/src/flows/hosted_ui/hosted_ui_platform.dart index 1d27513d434..f85c664717a 100644 --- a/packages/auth/amplify_auth_cognito_dart/lib/src/flows/hosted_ui/hosted_ui_platform.dart +++ b/packages/auth/amplify_auth_cognito_dart/lib/src/flows/hosted_ui/hosted_ui_platform.dart @@ -102,7 +102,11 @@ abstract class HostedUiPlatform implements Closeable { @protected @visibleForTesting @nonVirtual - Future getSignInUri({Uri? redirectUri, AuthProvider? provider, CognitoSignInWithWebUIPluginOptions? options}) async { + Future getSignInUri({ + Uri? redirectUri, + AuthProvider? provider, + CognitoSignInWithWebUIPluginOptions? options, + }) async { final state = generateState(); final codeVerifier = createCodeVerifier(); @@ -124,7 +128,7 @@ abstract class HostedUiPlatform implements Closeable { codeVerifier: codeVerifier, httpClient: httpClient, provider: provider, - options: options + options: options, ); final uri = _authCodeGrant!.getAuthorizationUrl( redirectUri ?? signInRedirectUri, diff --git a/packages/auth/amplify_auth_cognito_dart/lib/src/flows/hosted_ui/hosted_ui_platform_html.dart b/packages/auth/amplify_auth_cognito_dart/lib/src/flows/hosted_ui/hosted_ui_platform_html.dart index da90383c131..a0d2225570f 100644 --- a/packages/auth/amplify_auth_cognito_dart/lib/src/flows/hosted_ui/hosted_ui_platform_html.dart +++ b/packages/auth/amplify_auth_cognito_dart/lib/src/flows/hosted_ui/hosted_ui_platform_html.dart @@ -54,7 +54,10 @@ class HostedUiPlatformImpl extends HostedUiPlatform { required CognitoSignInWithWebUIPluginOptions options, AuthProvider? provider, }) async { - final signInUrl = (await getSignInUri(provider: provider, options: options)).toString(); + final signInUrl = (await getSignInUri( + provider: provider, + options: options, + )).toString(); await launchUrl(signInUrl); } diff --git a/packages/auth/amplify_auth_cognito_dart/lib/src/model/signin/cognito_sign_in_with_web_ui_plugin_options.dart b/packages/auth/amplify_auth_cognito_dart/lib/src/model/signin/cognito_sign_in_with_web_ui_plugin_options.dart index 9bd04aa3e42..55981797bab 100644 --- a/packages/auth/amplify_auth_cognito_dart/lib/src/model/signin/cognito_sign_in_with_web_ui_plugin_options.dart +++ b/packages/auth/amplify_auth_cognito_dart/lib/src/model/signin/cognito_sign_in_with_web_ui_plugin_options.dart @@ -19,7 +19,7 @@ class CognitoSignInWithWebUIPluginOptions extends SignInWithWebUIPluginOptions { this.language, this.loginHint, this.prompt, - this.resource + this.resource, }); /// {@macro amplify_auth_cognito.model.cognito_sign_in_with_web_ui_plugin_options} @@ -49,7 +49,7 @@ class CognitoSignInWithWebUIPluginOptions extends SignInWithWebUIPluginOptions { /// {@template amplify_auth_cognito.model.cognito_sign_in_with_web_ui_options.nonce} /// A random value that you can add to the request. The nonce value that you provide is included in the ID token /// that Amazon Cognito issues. To guard against replay attacks, your app can inspect the nonce claim in the ID - /// token and compare it to the one you generated. + /// token and compare it to the one you generated. /// {@endtemplate} final String? nonce; @@ -81,7 +81,15 @@ class CognitoSignInWithWebUIPluginOptions extends SignInWithWebUIPluginOptions { final String? resource; @override - List get props => [isPreferPrivateSession, browserPackageName, nonce, language, loginHint, prompt, resource]; + List get props => [ + isPreferPrivateSession, + browserPackageName, + nonce, + language, + loginHint, + prompt, + resource, + ]; @override String get runtimeTypeName => 'CognitoSignInWithWebUIPluginOptions'; diff --git a/packages/auth/amplify_auth_cognito_test/test/state/hosted_ui_state_machine_test.dart b/packages/auth/amplify_auth_cognito_test/test/state/hosted_ui_state_machine_test.dart index 2f724d19626..d6fb2a42c73 100644 --- a/packages/auth/amplify_auth_cognito_test/test/state/hosted_ui_state_machine_test.dart +++ b/packages/auth/amplify_auth_cognito_test/test/state/hosted_ui_state_machine_test.dart @@ -575,7 +575,7 @@ void main() { ) async { final signInUrl = await platform.getSignInUri( provider: provider, - options: options + options: options, ); _launchUrl.complete(signInUrl); }, @@ -584,8 +584,16 @@ void main() { expect(options.nonce == 'nonce', isTrue); expect(options.language == 'en', isTrue); expect(options.loginHint == 'username', isTrue); - expect(options.prompt?.contains(CognitoSignInWithWebUIPrompt.login), isTrue); - expect(options.prompt?.contains(CognitoSignInWithWebUIPrompt.consent), isTrue); + expect( + options.prompt?.contains(CognitoSignInWithWebUIPrompt.login), + isTrue, + ); + expect( + options.prompt?.contains( + CognitoSignInWithWebUIPrompt.consent, + ), + isTrue, + ); expect(options.resource == 'myapp://', isTrue); }), ), @@ -607,8 +615,11 @@ void main() { nonce: 'nonce', language: 'en', loginHint: 'username', - prompt: [CognitoSignInWithWebUIPrompt.login, CognitoSignInWithWebUIPrompt.consent], - resource: 'myapp://' + prompt: [ + CognitoSignInWithWebUIPrompt.login, + CognitoSignInWithWebUIPrompt.consent, + ], + resource: 'myapp://', ), ), ) From 6810c7b50e66a8c821a03caaa05f2354f5fa0189 Mon Sep 17 00:00:00 2001 From: Abhash Kumar Singh Date: Fri, 14 Nov 2025 11:40:14 -0800 Subject: [PATCH 4/9] fix test build --- .../native_auth_bridge_test.dart | 115 ++++++++++++++---- 1 file changed, 91 insertions(+), 24 deletions(-) diff --git a/packages/auth/amplify_auth_cognito/example/integration_test/native_auth_bridge_test.dart b/packages/auth/amplify_auth_cognito/example/integration_test/native_auth_bridge_test.dart index 4315ce00139..87a1539fdf7 100644 --- a/packages/auth/amplify_auth_cognito/example/integration_test/native_auth_bridge_test.dart +++ b/packages/auth/amplify_auth_cognito/example/integration_test/native_auth_bridge_test.dart @@ -53,16 +53,50 @@ void main() { dependencyManager ..addInstance( MockNativeAuthBridge( - signInWithUrl: expectAsync4(( - argUrl, - argCallbackurlscheme, - argPreferprivatesession, - argBrowserpackagename, + signInWithUrl: expectAsync1(( + argSignInOut, ) async { - expect(argUrl, contains(mockConfig.auth?.oauth?.domain)); - expect(argCallbackurlscheme, testUrlScheme); - expect(argPreferprivatesession, isFalse); - expect(argBrowserpackagename, browserPackage); + expect(argSignInOut.url, contains(mockConfig.auth?.oauth?.domain)); + expect(argSignInOut.callbackurlscheme, testUrlScheme); + expect(argSignInOut.preferprivatesession, isFalse); + expect(argSignInOut.browserPackageName, browserPackage); + return {'code': 'code', 'state': 'state'}; + }), + ), + ) + ..addInstance>( + const MockDispatcher(), + ); + await platform.signIn(options: options); + }); + + asyncTest('signInWithUrl with OIDC parameters', (_) async { + const options = CognitoSignInWithWebUIPluginOptions( + isPreferPrivateSession: false, + browserPackageName: browserPackage, + nonce: 'nonce', + language: 'en', + loginHint: 'username', + prompt: [CognitoSignInWithWebUIPrompt.login, CognitoSignInWithWebUIPrompt.consent], + resource: 'myapp://' + ); + dependencyManager + ..addInstance( + MockNativeAuthBridge( + signInWithUrl: expectAsync1(( + argSignInOut, + ) async { + expect(argSignInOut.url, contains(mockConfig.auth?.oauth?.domain)); + expect(argSignInOut.callbackurlscheme, testUrlScheme); + expect(argSignInOut.preferprivatesession, isFalse); + expect(argSignInOut.browserPackageName, browserPackage); + expect(argSignInOut.nonce, 'nonce'); + expect(argSignInOut.language, 'es'); + expect(argSignInOut.loginHint, 'username'); + expect(argSignInOut.prompt, isNotNull); + expect(argSignInOut.prompt?.contains(CognitoSignInWithWebUIPrompt.login.value), isTrue); + expect(argSignInOut.prompt?.contains(CognitoSignInWithWebUIPrompt.consent.value), isTrue); + expect(argSignInOut.resource, 'myapp://'); return {'code': 'code', 'state': 'state'}; }), ), @@ -81,16 +115,13 @@ void main() { dependencyManager ..addInstance( MockNativeAuthBridge( - signOutWithUrl: expectAsync4(( - argUrl, - argCallbackurlscheme, - argPreferprivatesession, - argBrowserpackagename, + signOutWithUrl: expectAsync1(( + argSignInOut ) async { - expect(argUrl, contains(mockConfig.auth?.oauth?.domain)); - expect(argCallbackurlscheme, testUrlScheme); - expect(argPreferprivatesession, isFalse); - expect(argBrowserpackagename, browserPackage); + expect(argSignInOut.url, contains(mockConfig.auth?.oauth?.domain)); + expect(argSignInOut.callbackurlscheme, testUrlScheme); + expect(argSignInOut.preferprivatesession, isFalse); + expect(argSignInOut.browserPackageName, browserPackage); }), ), ) @@ -103,12 +134,33 @@ void main() { ); } +class SignInOut { + SignInOut( + this.url, + this.callbackurlscheme, + this.preferprivatesession, + this.browserPackageName, + this.nonce, + this.language, + this.loginHint, + this.prompt, + this.resource + ) + + String url = ''; + String callbackurlscheme = ''; + bool preferprivatesession = false; + String? browserPackageName, + String? nonce; + String? language; + String? loginHint; + List? prompt; + String? resource; +} + typedef SignInOutFn = Future Function( - String argUrl, - String argCallbackurlscheme, - bool argPreferprivatesession, - String? argBrowserpackagename, + SignInOut signInOut ); class MockNativeAuthBridge extends Fake implements NativeAuthBridge { @@ -127,12 +179,22 @@ class MockNativeAuthBridge extends Fake implements NativeAuthBridge { String argCallbackurlscheme, bool argPreferprivatesession, String? argBrowserpackagename, + String? argNonce, + String? argLanguage, + String? argLoginHint, + List? argPrompt, + String? argResource, ) async { - return _signInWithUrl?.call( + return _signInWithUrl?.call(SignInOut( argUrl, argCallbackurlscheme, argPreferprivatesession, argBrowserpackagename, + argNonce, + argLanguage, + argLoginHint, + argPrompt, + argResource) ) ?? (throw UnimplementedError()); } @@ -144,11 +206,16 @@ class MockNativeAuthBridge extends Fake implements NativeAuthBridge { bool argPreferprivatesession, String? argBrowserpackagename, ) async { - return _signOutWithUrl?.call( + return _signOutWithUrl?.call(SignInOut( argUrl, argCallbackurlscheme, argPreferprivatesession, argBrowserpackagename, + null, + null, + null, + null, + null) ) ?? (throw UnimplementedError()); } From a4f9b342f3e8954bf18563b42979138b31f2ab06 Mon Sep 17 00:00:00 2001 From: Abhash Kumar Singh Date: Fri, 14 Nov 2025 11:58:28 -0800 Subject: [PATCH 5/9] fix build --- .../example/integration_test/native_auth_bridge_test.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/auth/amplify_auth_cognito/example/integration_test/native_auth_bridge_test.dart b/packages/auth/amplify_auth_cognito/example/integration_test/native_auth_bridge_test.dart index 87a1539fdf7..b9216ac3ffb 100644 --- a/packages/auth/amplify_auth_cognito/example/integration_test/native_auth_bridge_test.dart +++ b/packages/auth/amplify_auth_cognito/example/integration_test/native_auth_bridge_test.dart @@ -145,12 +145,12 @@ class SignInOut { this.loginHint, this.prompt, this.resource - ) + ); String url = ''; String callbackurlscheme = ''; bool preferprivatesession = false; - String? browserPackageName, + String? browserPackageName; String? nonce; String? language; String? loginHint; From 6a5607e3c46f44e06eb643f5d15b61ea850349cc Mon Sep 17 00:00:00 2001 From: Abhash Kumar Singh Date: Fri, 14 Nov 2025 12:06:47 -0800 Subject: [PATCH 6/9] add formatting changes --- .../native_auth_bridge_test.dart | 101 ++++++++++-------- .../auth/amplify_auth_cognito/pubspec.yaml | 3 +- 2 files changed, 60 insertions(+), 44 deletions(-) diff --git a/packages/auth/amplify_auth_cognito/example/integration_test/native_auth_bridge_test.dart b/packages/auth/amplify_auth_cognito/example/integration_test/native_auth_bridge_test.dart index b9216ac3ffb..b5fc262f308 100644 --- a/packages/auth/amplify_auth_cognito/example/integration_test/native_auth_bridge_test.dart +++ b/packages/auth/amplify_auth_cognito/example/integration_test/native_auth_bridge_test.dart @@ -53,10 +53,11 @@ void main() { dependencyManager ..addInstance( MockNativeAuthBridge( - signInWithUrl: expectAsync1(( - argSignInOut, - ) async { - expect(argSignInOut.url, contains(mockConfig.auth?.oauth?.domain)); + signInWithUrl: expectAsync1((argSignInOut) async { + expect( + argSignInOut.url, + contains(mockConfig.auth?.oauth?.domain), + ); expect(argSignInOut.callbackurlscheme, testUrlScheme); expect(argSignInOut.preferprivatesession, isFalse); expect(argSignInOut.browserPackageName, browserPackage); @@ -77,16 +78,20 @@ void main() { nonce: 'nonce', language: 'en', loginHint: 'username', - prompt: [CognitoSignInWithWebUIPrompt.login, CognitoSignInWithWebUIPrompt.consent], - resource: 'myapp://' + prompt: [ + CognitoSignInWithWebUIPrompt.login, + CognitoSignInWithWebUIPrompt.consent, + ], + resource: 'myapp://', ); dependencyManager ..addInstance( MockNativeAuthBridge( - signInWithUrl: expectAsync1(( - argSignInOut, - ) async { - expect(argSignInOut.url, contains(mockConfig.auth?.oauth?.domain)); + signInWithUrl: expectAsync1((argSignInOut) async { + expect( + argSignInOut.url, + contains(mockConfig.auth?.oauth?.domain), + ); expect(argSignInOut.callbackurlscheme, testUrlScheme); expect(argSignInOut.preferprivatesession, isFalse); expect(argSignInOut.browserPackageName, browserPackage); @@ -94,8 +99,18 @@ void main() { expect(argSignInOut.language, 'es'); expect(argSignInOut.loginHint, 'username'); expect(argSignInOut.prompt, isNotNull); - expect(argSignInOut.prompt?.contains(CognitoSignInWithWebUIPrompt.login.value), isTrue); - expect(argSignInOut.prompt?.contains(CognitoSignInWithWebUIPrompt.consent.value), isTrue); + expect( + argSignInOut.prompt?.contains( + CognitoSignInWithWebUIPrompt.login.value, + ), + isTrue, + ); + expect( + argSignInOut.prompt?.contains( + CognitoSignInWithWebUIPrompt.consent.value, + ), + isTrue, + ); expect(argSignInOut.resource, 'myapp://'); return {'code': 'code', 'state': 'state'}; }), @@ -115,10 +130,11 @@ void main() { dependencyManager ..addInstance( MockNativeAuthBridge( - signOutWithUrl: expectAsync1(( - argSignInOut - ) async { - expect(argSignInOut.url, contains(mockConfig.auth?.oauth?.domain)); + signOutWithUrl: expectAsync1((argSignInOut) async { + expect( + argSignInOut.url, + contains(mockConfig.auth?.oauth?.domain), + ); expect(argSignInOut.callbackurlscheme, testUrlScheme); expect(argSignInOut.preferprivatesession, isFalse); expect(argSignInOut.browserPackageName, browserPackage); @@ -136,7 +152,7 @@ void main() { class SignInOut { SignInOut( - this.url, + this.url, this.callbackurlscheme, this.preferprivatesession, this.browserPackageName, @@ -144,7 +160,7 @@ class SignInOut { this.language, this.loginHint, this.prompt, - this.resource + this.resource, ); String url = ''; @@ -158,10 +174,7 @@ class SignInOut { String? resource; } -typedef SignInOutFn = - Future Function( - SignInOut signInOut - ); +typedef SignInOutFn = Future Function(SignInOut signInOut); class MockNativeAuthBridge extends Fake implements NativeAuthBridge { MockNativeAuthBridge({ @@ -185,16 +198,18 @@ class MockNativeAuthBridge extends Fake implements NativeAuthBridge { List? argPrompt, String? argResource, ) async { - return _signInWithUrl?.call(SignInOut( - argUrl, - argCallbackurlscheme, - argPreferprivatesession, - argBrowserpackagename, - argNonce, - argLanguage, - argLoginHint, - argPrompt, - argResource) + return _signInWithUrl?.call( + SignInOut( + argUrl, + argCallbackurlscheme, + argPreferprivatesession, + argBrowserpackagename, + argNonce, + argLanguage, + argLoginHint, + argPrompt, + argResource, + ), ) ?? (throw UnimplementedError()); } @@ -206,16 +221,18 @@ class MockNativeAuthBridge extends Fake implements NativeAuthBridge { bool argPreferprivatesession, String? argBrowserpackagename, ) async { - return _signOutWithUrl?.call(SignInOut( - argUrl, - argCallbackurlscheme, - argPreferprivatesession, - argBrowserpackagename, - null, - null, - null, - null, - null) + return _signOutWithUrl?.call( + SignInOut( + argUrl, + argCallbackurlscheme, + argPreferprivatesession, + argBrowserpackagename, + null, + null, + null, + null, + null, + ), ) ?? (throw UnimplementedError()); } diff --git a/packages/auth/amplify_auth_cognito/pubspec.yaml b/packages/auth/amplify_auth_cognito/pubspec.yaml index 5f99b0fd79a..0730ded28ba 100644 --- a/packages/auth/amplify_auth_cognito/pubspec.yaml +++ b/packages/auth/amplify_auth_cognito/pubspec.yaml @@ -21,8 +21,7 @@ platforms: dependencies: amplify_analytics_pinpoint: ">=2.7.0 <2.8.0" amplify_analytics_pinpoint_dart: ">=0.4.12 <0.5.0" - amplify_auth_cognito_dart: - path: ../amplify_auth_cognito_dart + amplify_auth_cognito_dart: ">=0.11.14 <0.12.0" amplify_core: ">=2.7.0 <2.8.0" amplify_flutter: ">=2.7.0 <2.8.0" amplify_secure_storage: ">=0.5.13 <0.6.0" From a5864d3f43048fa5fd3ff6f2463fdd4825af10dd Mon Sep 17 00:00:00 2001 From: Abhash Kumar Singh Date: Mon, 17 Nov 2025 11:28:55 -0800 Subject: [PATCH 7/9] add missing generated file --- ..._sign_in_with_web_ui_plugin_options.g.dart | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/packages/auth/amplify_auth_cognito_dart/lib/src/model/signin/cognito_sign_in_with_web_ui_plugin_options.g.dart b/packages/auth/amplify_auth_cognito_dart/lib/src/model/signin/cognito_sign_in_with_web_ui_plugin_options.g.dart index c27f60ae441..610167df4a4 100644 --- a/packages/auth/amplify_auth_cognito_dart/lib/src/model/signin/cognito_sign_in_with_web_ui_plugin_options.g.dart +++ b/packages/auth/amplify_auth_cognito_dart/lib/src/model/signin/cognito_sign_in_with_web_ui_plugin_options.g.dart @@ -20,6 +20,18 @@ _$CognitoSignInWithWebUIPluginOptionsFromJson(Map json) => 'browserPackageName', (v) => v as String?, ), + nonce: $checkedConvert('nonce', (v) => v as String?), + language: $checkedConvert('language', (v) => v as String?), + loginHint: $checkedConvert('loginHint', (v) => v as String?), + prompt: $checkedConvert( + 'prompt', + (v) => (v as List?) + ?.map( + (e) => $enumDecode(_$CognitoSignInWithWebUIPromptEnumMap, e), + ) + .toList(), + ), + resource: $checkedConvert('resource', (v) => v as String?), ); return val; }); @@ -30,4 +42,20 @@ Map _$CognitoSignInWithWebUIPluginOptionsToJson( 'isPreferPrivateSession': instance.isPreferPrivateSession, if (instance.browserPackageName case final value?) 'browserPackageName': value, + if (instance.nonce case final value?) 'nonce': value, + if (instance.language case final value?) 'language': value, + if (instance.loginHint case final value?) 'loginHint': value, + if (instance.prompt + ?.map((e) => _$CognitoSignInWithWebUIPromptEnumMap[e]!) + .toList() + case final value?) + 'prompt': value, + if (instance.resource case final value?) 'resource': value, +}; + +const _$CognitoSignInWithWebUIPromptEnumMap = { + CognitoSignInWithWebUIPrompt.none: 'none', + CognitoSignInWithWebUIPrompt.login: 'login', + CognitoSignInWithWebUIPrompt.selectAccount: 'select_account', + CognitoSignInWithWebUIPrompt.consent: 'consent', }; From c2e90a9504ad2594fa3b5517cde9d39642332b29 Mon Sep 17 00:00:00 2001 From: Abhash Kumar Singh Date: Tue, 18 Nov 2025 12:12:10 -0800 Subject: [PATCH 8/9] update tests --- .../example/integration_test/native_auth_bridge_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/auth/amplify_auth_cognito/example/integration_test/native_auth_bridge_test.dart b/packages/auth/amplify_auth_cognito/example/integration_test/native_auth_bridge_test.dart index b5fc262f308..2965fab3359 100644 --- a/packages/auth/amplify_auth_cognito/example/integration_test/native_auth_bridge_test.dart +++ b/packages/auth/amplify_auth_cognito/example/integration_test/native_auth_bridge_test.dart @@ -96,7 +96,7 @@ void main() { expect(argSignInOut.preferprivatesession, isFalse); expect(argSignInOut.browserPackageName, browserPackage); expect(argSignInOut.nonce, 'nonce'); - expect(argSignInOut.language, 'es'); + expect(argSignInOut.language, 'en'); expect(argSignInOut.loginHint, 'username'); expect(argSignInOut.prompt, isNotNull); expect( From bb9a3b6a8a1b375fa4826c6179155e0dea9ea930 Mon Sep 17 00:00:00 2001 From: Abhash Kumar Singh Date: Wed, 19 Nov 2025 11:20:22 -0800 Subject: [PATCH 9/9] address review comments --- packages/auth/amplify_auth_cognito_test/pubspec.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/auth/amplify_auth_cognito_test/pubspec.yaml b/packages/auth/amplify_auth_cognito_test/pubspec.yaml index 42ecbfccab5..a7b7ee33844 100644 --- a/packages/auth/amplify_auth_cognito_test/pubspec.yaml +++ b/packages/auth/amplify_auth_cognito_test/pubspec.yaml @@ -7,8 +7,7 @@ environment: dependencies: amplify_analytics_pinpoint_dart: any - amplify_auth_cognito_dart: - path: ../amplify_auth_cognito_dart + amplify_auth_cognito_dart: any amplify_core: any amplify_secure_storage_dart: any async: ^2.10.0