Skip to content

Commit d0e827a

Browse files
chore!: remove deprecated auth types (#4764)
* chore!: remove deprecated auth types * chore: rename `EnableSoftwareTokenMfaException` to `CodeMismatchException`
1 parent 71fa108 commit d0e827a

File tree

59 files changed

+81
-1441
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+81
-1441
lines changed

packages/amplify_core/lib/src/category/amplify_auth_category.dart

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,21 +1292,6 @@ class AuthCategory extends AmplifyCategory<AuthPluginInterface> {
12921292
),
12931293
);
12941294

1295-
/// {@macro amplify_core.amplify_auth_category.send_attribute_verification_code}
1296-
@Deprecated('Use sendUserAttributeVerificationCode.')
1297-
Future<ResendUserAttributeConfirmationCodeResult>
1298-
resendUserAttributeConfirmationCode({
1299-
required AuthUserAttributeKey userAttributeKey,
1300-
ResendUserAttributeConfirmationCodeOptions? options,
1301-
}) =>
1302-
identifyCall(
1303-
AuthCategoryMethod.sendUserAttributeVerificationCode,
1304-
() => defaultPlugin.sendUserAttributeVerificationCode(
1305-
userAttributeKey: userAttributeKey,
1306-
options: options,
1307-
),
1308-
);
1309-
13101295
/// {@template amplify_core.amplify_auth_category.set_up_totp}
13111296
/// Initiates setup of a time-based one-time passcode (TOTP) MFA method for the
13121297
/// current user.

packages/amplify_core/lib/src/config/auth/auth_config.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ class AuthConfig extends AmplifyPluginConfigMap {
2424
CognitoUserPoolConfig? userPoolConfig,
2525
CognitoIdentityPoolConfig? identityPoolConfig,
2626
CognitoOAuthConfig? hostedUiConfig,
27-
AuthenticationFlowType? authenticationFlowType,
2827
List<SocialProvider>? socialProviders,
2928
List<CognitoUserAttributeKey>? usernameAttributes,
3029
List<CognitoUserAttributeKey>? signupAttributes,
@@ -40,7 +39,6 @@ class AuthConfig extends AmplifyPluginConfigMap {
4039
auth: AWSConfigMap.withDefault(
4140
CognitoAuthConfig(
4241
oAuth: hostedUiConfig,
43-
authenticationFlowType: authenticationFlowType,
4442
socialProviders: socialProviders,
4543
usernameAttributes: usernameAttributes ?? const [],
4644
signupAttributes: signupAttributes ?? const [],

packages/amplify_core/lib/src/config/auth/cognito/auth.dart

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ part 'auth.g.dart';
1313
class CognitoAuthConfig with AWSEquatable<CognitoAuthConfig>, AWSSerializable {
1414
const CognitoAuthConfig({
1515
this.oAuth,
16-
this.authenticationFlowType,
1716
this.socialProviders,
1817
this.usernameAttributes,
1918
this.signupAttributes,
@@ -29,10 +28,6 @@ class CognitoAuthConfig with AWSEquatable<CognitoAuthConfig>, AWSSerializable {
2928
@JsonKey(name: 'OAuth')
3029
final CognitoOAuthConfig? oAuth;
3130

32-
@JsonKey(
33-
unknownEnumValue: JsonKey.nullForUndefinedEnumValue,
34-
)
35-
final AuthenticationFlowType? authenticationFlowType;
3631
final List<SocialProvider>? socialProviders;
3732
final List<CognitoUserAttributeKey>? usernameAttributes;
3833
final List<CognitoUserAttributeKey>? signupAttributes;
@@ -44,7 +39,6 @@ class CognitoAuthConfig with AWSEquatable<CognitoAuthConfig>, AWSSerializable {
4439
@override
4540
List<Object?> get props => [
4641
oAuth,
47-
authenticationFlowType,
4842
socialProviders,
4943
usernameAttributes,
5044
signupAttributes,
@@ -56,7 +50,6 @@ class CognitoAuthConfig with AWSEquatable<CognitoAuthConfig>, AWSSerializable {
5650

5751
CognitoAuthConfig copyWith({
5852
CognitoOAuthConfig? oAuth,
59-
AuthenticationFlowType? authenticationFlowType,
6053
List<SocialProvider>? socialProviders,
6154
List<CognitoUserAttributeKey>? usernameAttributes,
6255
List<CognitoUserAttributeKey>? signupAttributes,
@@ -67,8 +60,6 @@ class CognitoAuthConfig with AWSEquatable<CognitoAuthConfig>, AWSSerializable {
6760
}) {
6861
return CognitoAuthConfig(
6962
oAuth: oAuth ?? this.oAuth,
70-
authenticationFlowType:
71-
authenticationFlowType ?? this.authenticationFlowType,
7263
socialProviders: socialProviders ??
7364
(this.socialProviders == null
7465
? null

packages/amplify_core/lib/src/config/auth/cognito/auth.g.dart

Lines changed: 0 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/amplify_core/lib/src/config/auth/cognito/authentication_flow_type.dart

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ enum AuthenticationFlowType {
1414
@JsonValue('USER_PASSWORD_AUTH')
1515
userPasswordAuth('USER_PASSWORD_AUTH'),
1616

17-
/// Authentication flow for custom flow which are backed by Lambda triggers.
18-
@Deprecated('Use customAuthWithSrp or customAuthWithoutSrp instead')
19-
@JsonValue('CUSTOM_AUTH')
20-
customAuth('CUSTOM_AUTH'),
21-
2217
/// Authentication flow which start with SRP and then move to custom auth
2318
/// flow.
2419
@JsonValue('CUSTOM_AUTH_WITH_SRP')

packages/amplify_core/lib/src/plugin/amplify_auth_plugin_interface.dart

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -153,18 +153,6 @@ abstract class AuthPluginInterface extends AmplifyPluginInterface {
153153
);
154154
}
155155

156-
/// {@macro amplify_core.amplify_auth_category.send_attribute_verification_code}
157-
@Deprecated('Use sendUserAttributeVerificationCode instead.')
158-
Future<ResendUserAttributeConfirmationCodeResult>
159-
resendUserAttributeConfirmationCode({
160-
required AuthUserAttributeKey userAttributeKey,
161-
ResendUserAttributeConfirmationCodeOptions? options,
162-
}) {
163-
throw UnimplementedError(
164-
'resendUserAttributeConfirmationCode() has not been implemented.',
165-
);
166-
}
167-
168156
/// {@macro amplify_core.amplify_auth_category.send_attribute_verification_code}
169157
Future<SendUserAttributeVerificationCodeResult>
170158
sendUserAttributeVerificationCode({

packages/amplify_core/lib/src/types/auth/attribute/send_user_attribute_verification_code_options.dart

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,3 @@ abstract class SendUserAttributeVerificationCodePluginOptions
4949
/// {@macro amplify_core.auth.send_user_attribute_verification_code_plugin_options}
5050
const SendUserAttributeVerificationCodePluginOptions();
5151
}
52-
53-
/// {@macro amplify_core.send_attribute_verification_code_options}
54-
@Deprecated('Use SendUserAttributeVerificationCodeOptions.')
55-
typedef ResendUserAttributeConfirmationCodeOptions
56-
= SendUserAttributeVerificationCodeOptions;
57-
58-
/// @nodoc
59-
/// {@macro amplify_core.auth.send_user_attribute_verification_code_plugin_options}
60-
@Deprecated('Use SendUserAttributeVerificationCodePluginOptions.')
61-
typedef ResendUserAttributeConfirmationCodePluginOptions
62-
= SendUserAttributeVerificationCodePluginOptions;

packages/amplify_core/lib/src/types/auth/attribute/send_user_attribute_verification_code_result.dart

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,3 @@ class SendUserAttributeVerificationCodeResult
4040
Map<String, Object?> toJson() =>
4141
_$SendUserAttributeVerificationCodeResultToJson(this);
4242
}
43-
44-
/// {@macro amplify_core.send_user_attribute_verification_code_result}
45-
@Deprecated('Use SendUserAttributeVerificationCodeResult.')
46-
typedef ResendUserAttributeConfirmationCodeResult
47-
= SendUserAttributeVerificationCodeResult;

packages/amplify_core/lib/src/types/auth/auth_code_delivery_details.dart

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,6 @@ class AuthCodeDeliveryDetails
5757
/// being updated.
5858
final AuthUserAttributeKey? attributeKey;
5959

60-
/// If a user attribute update is underway, this is the name of the attribute
61-
/// being updated.
62-
@Deprecated('Use attributeKey instead')
63-
String? get attributeName => attributeKey?.key;
64-
6560
@override
6661
List<Object?> get props => [attributeKey, deliveryMedium, destination];
6762

packages/amplify_core/lib/src/types/auth/session/fetch_auth_session_options.dart

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33

44
import 'package:amplify_core/amplify_core.dart';
55

6-
/// @nodoc
7-
/// {@macro amplify_core.auth.fetch_auth_session_options}
8-
@Deprecated('Use FetchAuthSessionOptions instead')
9-
typedef AuthSessionOptions = FetchAuthSessionOptions;
10-
116
/// {@category Auth}
127
/// {@template amplify_core.auth.fetch_auth_session_options}
138
/// Options for `Amplify.Auth.fetchAuthSession`.

0 commit comments

Comments
 (0)