|
| 1 | +import { getCustomStaticPath } from '@/utils/getCustomStaticPath'; |
| 2 | + |
| 3 | +export const meta = { |
| 4 | + title: 'Passwordless', |
| 5 | + description: 'Learn how to configure passwordless sign-in flows', |
| 6 | + platforms: [ |
| 7 | + 'android', |
| 8 | + 'angular', |
| 9 | + 'javascript', |
| 10 | + 'nextjs', |
| 11 | + 'react', |
| 12 | + 'react-native', |
| 13 | + 'swift', |
| 14 | + 'vue' |
| 15 | + ] |
| 16 | +}; |
| 17 | + |
| 18 | +export function getStaticPaths() { |
| 19 | + return getCustomStaticPath(meta.platforms); |
| 20 | +} |
| 21 | + |
| 22 | +export function getStaticProps() { |
| 23 | + return { |
| 24 | + props: { |
| 25 | + meta |
| 26 | + } |
| 27 | + }; |
| 28 | +} |
| 29 | + |
| 30 | +Amplify supports the use of passwordless authentication flows using the following methods: |
| 31 | + |
| 32 | +- [SMS-based one-time password (SMS OTP)](#sms-otp) |
| 33 | +- [Email-based one-time password (Email OTP)](#email-otp) |
| 34 | +- [WebAuthn passkey](#webauthn-passkey) |
| 35 | + |
| 36 | +Passwordless authentication removes the security risks and user friction associated with traditional passwords. |
| 37 | +{/* add more color */} |
| 38 | + |
| 39 | +<Callout warning> |
| 40 | + |
| 41 | +**Warning:** Passwordless configuration is currently not available in `defineAuth`. We are currently working towards enabling support for passwordless configurations. [Visit the GitHub issue to track the progress](https://github.com/aws-amplify/amplify-backend/issues/2276) |
| 42 | + |
| 43 | +</Callout> |
| 44 | + |
| 45 | +{/* need a section about what a "preferred" factor is */} |
| 46 | + |
| 47 | +## SMS OTP |
| 48 | + |
| 49 | +SMS-based authentication uses phone numbers as the identifier and text messages as the verification channel. At a high level end users will perform the following steps to authenticate: |
| 50 | + |
| 51 | +1. User enters their phone number to sign up/sign in |
| 52 | +2. They receive a text message with a time-limited code |
| 53 | +3. After the user enters their code they are authenticated |
| 54 | + |
| 55 | +{/* quick blurb of basic usage */} |
| 56 | +<InlineFilter filters={["angular", "javascript", "nextjs", "react", "react-native", "vue"]}> |
| 57 | + |
| 58 | +{/* */} |
| 59 | + |
| 60 | +</InlineFilter> |
| 61 | +<InlineFilter filters={["android"]}> |
| 62 | + |
| 63 | +{/* */} |
| 64 | + |
| 65 | +</InlineFilter> |
| 66 | + |
| 67 | +<InlineFilter filters={["swift"]}> |
| 68 | + |
| 69 | +{/* */} |
| 70 | + |
| 71 | +</InlineFilter> |
| 72 | + |
| 73 | +<Callout info> |
| 74 | + |
| 75 | +SMS-based one-time password requires your Amazon Cognito user pool to be configured to use Amazon Simple Notification Service (SNS) to send text messages. [Learn how to configure your auth resource with SNS](/[platform]/build-a-backend/auth/moving-to-production/#sms). |
| 76 | + |
| 77 | +{/* NOTE the linked page will need to be updated with sns instructions */} |
| 78 | + |
| 79 | +</Callout> |
| 80 | + |
| 81 | +[Learn more about using SMS OTP in your application code](/[platform]/build-a-backend/auth/connect-your-frontend/sign-in/#sms-otp). |
| 82 | + |
| 83 | +## Email OTP |
| 84 | + |
| 85 | +Email-based authentication uses email addresses for identification and verification. At a high level end users will perform the following steps to authenticate: |
| 86 | + |
| 87 | +1. User enters their email address to sign up/sign in |
| 88 | +2. They receive an email message with a time-limited code |
| 89 | +3. After the users enters their code they are authenticated |
| 90 | + |
| 91 | +{/* quick blurb of basic usage */} |
| 92 | +<InlineFilter filters={["angular", "javascript", "nextjs", "react", "react-native", "vue"]}> |
| 93 | + |
| 94 | +{/* */} |
| 95 | + |
| 96 | +</InlineFilter> |
| 97 | +<InlineFilter filters={["android"]}> |
| 98 | + |
| 99 | +{/* */} |
| 100 | + |
| 101 | +</InlineFilter> |
| 102 | +<InlineFilter filters={["swift"]}> |
| 103 | + |
| 104 | +{/* */} |
| 105 | + |
| 106 | +</InlineFilter> |
| 107 | + |
| 108 | +<Callout info> |
| 109 | + |
| 110 | +Email-based one-time password requires your Amazon Cognito user pool to be configured to use Amazon Simple Email Service (SES) to send email messages. [Learn how to configure your auth resource with SES](/[platform]/build-a-backend/auth/moving-to-production/#email). |
| 111 | + |
| 112 | +</Callout> |
| 113 | + |
| 114 | +[Learn more about using email OTP in your application code](/[platform]/build-a-backend/auth/connect-your-frontend/sign-in/#email-otp). |
| 115 | + |
| 116 | +## WebAuthn Passkey |
| 117 | + |
| 118 | +WebAuthn uses biometrics or security keys for authentication, leveraging device-specific security features. At a high level end users will perform the following steps to authenticate: |
| 119 | + |
| 120 | +1. User chooses to register a passkey |
| 121 | +2. Their device prompts for biometric/security key verification |
| 122 | +3. For future logins, they'll authenticate using the same method |
| 123 | + |
| 124 | +{/* quick blurb of basic usage */} |
| 125 | +<InlineFilter filters={["angular", "javascript", "nextjs", "react", "react-native", "vue"]}> |
| 126 | + |
| 127 | +{/* */} |
| 128 | + |
| 129 | +</InlineFilter> |
| 130 | +<InlineFilter filters={["android"]}> |
| 131 | + |
| 132 | +{/* */} |
| 133 | + |
| 134 | +</InlineFilter> |
| 135 | +<InlineFilter filters={["swift"]}> |
| 136 | + |
| 137 | +{/* */} |
| 138 | + |
| 139 | +</InlineFilter> |
| 140 | + |
| 141 | +[Learn more about using WebAuthn passkeys in your application code](/[platform]/build-a-backend/auth/connect-your-frontend/sign-in/#webauthn-passkeys). |
| 142 | + |
| 143 | +### Managing credentials |
| 144 | + |
| 145 | +{/* quick blurb then segue over to "manage WebAuthn credentials" page */} |
| 146 | + |
| 147 | +[Learn more about managing WebAuthn credentials](/[platform]/build-a-backend/auth/manage-users/manage-webauthn-credentials). |
0 commit comments