Skip to content

Commit 6754ce3

Browse files
fix(auth): rename passwordless_options to passwordless (aws-amplify#14691)
1 parent db2825b commit 6754ce3

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

packages/core/__tests__/parseAmplifyOutputs.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ describe('parseAmplifyOutputs tests', () => {
189189
user_pool_id: 'us-east-1:test',
190190
user_pool_client_id: 'xxxx',
191191
aws_region: 'us-east-1',
192-
passwordless_options: {
192+
passwordless: {
193193
email_otp_enabled: true,
194194
sms_otp_enabled: true,
195195
web_authn: {
@@ -222,7 +222,7 @@ describe('parseAmplifyOutputs tests', () => {
222222
user_pool_id: 'us-east-1:test',
223223
user_pool_client_id: 'xxxx',
224224
aws_region: 'us-east-1',
225-
passwordless_options: {
225+
passwordless: {
226226
email_otp_enabled: true,
227227
sms_otp_enabled: false,
228228
preferred_challenge: 'EMAIL_OTP',

packages/core/src/parseAmplifyOutputs.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function parseAuth(
9090
username_attributes,
9191
standard_required_attributes,
9292
groups,
93-
passwordless_options,
93+
passwordless,
9494
} = amplifyOutputsAuthProperties;
9595

9696
const authConfig = {
@@ -160,18 +160,18 @@ function parseAuth(
160160
);
161161
}
162162

163-
if (passwordless_options) {
163+
if (passwordless) {
164164
authConfig.Cognito.passwordless = {
165-
emailOtpEnabled: passwordless_options.email_otp_enabled,
166-
smsOtpEnabled: passwordless_options.sms_otp_enabled,
167-
webAuthn: passwordless_options.web_authn
165+
emailOtpEnabled: passwordless.email_otp_enabled,
166+
smsOtpEnabled: passwordless.sms_otp_enabled,
167+
webAuthn: passwordless.web_authn
168168
? {
169-
relyingPartyId: passwordless_options.web_authn.relying_party_id,
170-
userVerification: passwordless_options.web_authn.user_verification,
169+
relyingPartyId: passwordless.web_authn.relying_party_id,
170+
userVerification: passwordless.web_authn.user_verification,
171171
}
172172
: undefined,
173173
preferredChallenge:
174-
passwordless_options.preferred_challenge as PreferredChallenge,
174+
passwordless.preferred_challenge as PreferredChallenge,
175175
};
176176
}
177177

packages/core/src/singleton/AmplifyOutputs/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export interface AmplifyOutputsAuthProperties {
4343
mfa_configuration?: string;
4444
mfa_methods?: string[];
4545
groups?: Partial<Record<UserGroupName, UserGroupPrecedence>>[];
46-
passwordless_options?: {
46+
passwordless?: {
4747
email_otp_enabled?: boolean;
4848
sms_otp_enabled?: boolean;
4949
web_authn?: {

0 commit comments

Comments
 (0)