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

Add passwordless #8127

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -1613,7 +1613,8 @@
"voteField",
"ampx",
"autodetection",
"jamba"
"jamba",
"webauthn"
],
"flagWords": ["hte", "full-stack", "Full-stack", "Full-Stack", "sudo"],
"patterns": [
Expand Down
6 changes: 6 additions & 0 deletions src/directory/directory.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ export const directory = {
{
path: 'src/pages/[platform]/build-a-backend/auth/concepts/phone/index.mdx'
},
{
path: 'src/pages/[platform]/build-a-backend/auth/concepts/passwordless/index.mdx'
},
{
path: 'src/pages/[platform]/build-a-backend/auth/concepts/user-attributes/index.mdx'
},
Expand Down Expand Up @@ -137,6 +140,9 @@ export const directory = {
{
path: 'src/pages/[platform]/build-a-backend/auth/manage-users/manage-passwords/index.mdx'
},
{
path: 'src/pages/[platform]/build-a-backend/auth/manage-users/manage-webauthn-credentials/index.mdx'
},
{
path: 'src/pages/[platform]/build-a-backend/auth/manage-users/manage-devices/index.mdx'
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
import { getCustomStaticPath } from '@/utils/getCustomStaticPath';

export const meta = {
title: 'Passwordless',
description: 'Learn how to configure passwordless sign-in flows',
platforms: [
'android',
'angular',
'flutter',
'javascript',
'nextjs',
'react',
'react-native',
'swift',
'vue'
]
};

export function getStaticPaths() {
return getCustomStaticPath(meta.platforms);
}

export function getStaticProps() {
return {
props: {
meta
}
};
}

Amplify supports the use of passwordless authentication flows using the following methods:

- [SMS-based one-time password (SMS OTP)](#sms-otp)
- [Email-based one-time password (Email OTP)](#email-otp)
- [WebAuthn passkey](#webauthn-passkey)

Passwordless authentication removes the security risks and user friction associated with traditional passwords.
{/* add more color */}

<Callout warning>

**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://link-to-backend-issue)

{/* @TODO file issue */}

</Callout>

{/* need a section about what a "preferred" factor is */}

## SMS OTP

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:

1. User enters their phone number to sign up/sign in
2. They receive a text message with a time-limited 6-digit code
3. After the user enters their code they are authenticated

{/* quick blurb of basic usage */}
<InlineFilter filters={["angular", "javascript", "nextjs", "react", "react-native", "vue"]}>

{/* */}

</InlineFilter>
<InlineFilter filters={["android"]}>

{/* */}

</InlineFilter>
<InlineFilter filters={["flutter"]}>

{/* */}

</InlineFilter>
<InlineFilter filters={["swift"]}>

{/* */}

</InlineFilter>

<Callout info>

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).

{/* NOTE the linked page will need to be updated with sns instructions */}

</Callout>

[Learn more about using SMS OTP in your application code](/[platform]/build-a-backend/auth/connect-your-frontend/sign-in/#sms-otp).

## Email OTP

Email-based authentication uses email addresses for identification and verification. At a high level end users will perform the following steps to authenticate:

1. User enters their email address to sign up/sign in
2. They receive an email message with a time-limited 6-digit code
3. After the users enters their code they are authenticated

{/* quick blurb of basic usage */}
<InlineFilter filters={["angular", "javascript", "nextjs", "react", "react-native", "vue"]}>

{/* */}

</InlineFilter>
<InlineFilter filters={["android"]}>

{/* */}

</InlineFilter>
<InlineFilter filters={["flutter"]}>

{/* */}

</InlineFilter>
<InlineFilter filters={["swift"]}>

{/* */}

</InlineFilter>

<Callout info>

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).

</Callout>

[Learn more about using email OTP in your application code](/[platform]/build-a-backend/auth/connect-your-frontend/sign-in/#email-otp).

## WebAuthn Passkey

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:

1. User chooses to register a passkey
2. Their device prompts for biometric/security key verification
3. For future logins, they'll authenticate using the same method

{/* quick blurb of basic usage */}
<InlineFilter filters={["angular", "javascript", "nextjs", "react", "react-native", "vue"]}>

{/* */}

</InlineFilter>
<InlineFilter filters={["android"]}>

{/* */}

</InlineFilter>
<InlineFilter filters={["flutter"]}>

{/* */}

</InlineFilter>
<InlineFilter filters={["swift"]}>

{/* */}

</InlineFilter>

[Learn more about using WebAuthn passkeys in your application code](/[platform]/build-a-backend/auth/connect-your-frontend/sign-in/#webauthn-passkeys).

### Managing credentials

{/* quick blurb then segue over to "manage WebAuthn credentials" page */}

[Learn more about managing WebAuthn credentials](/[platform]/build-a-backend/auth/manage-users/manage-webauthn-credentials).

{/* ?? */}
{/* ## Adding passwords later */}
Original file line number Diff line number Diff line change
Expand Up @@ -1099,4 +1099,81 @@ func socialSignInWithWebUI() -> AnyCancellable {

</InlineFilter>

{/* sign-in with web UI (this is a very limited alternative to the Authenticator) */}
## Sign in with passwordless methods

Your application's users can also sign in using passwordless methods. To learn more, visit the [concepts page for passwordless](/[platform]/build-a-backend/auth/concepts/passwordless/)

### SMS OTP

{/* blurb with supplemental information about handling sign-in, events, etc. */}

<InlineFilter filters={["angular", "javascript", "nextjs", "react", "react-native", "vue"]}>

{/* */}

</InlineFilter>
<InlineFilter filters={["android"]}>

{/* */}

</InlineFilter>
<InlineFilter filters={["flutter"]}>

{/* */}

</InlineFilter>
<InlineFilter filters={["swift"]}>

{/* */}

</InlineFilter>

### Email OTP

{/* blurb with supplemental information about handling sign-in, events, etc. */}

<InlineFilter filters={["angular", "javascript", "nextjs", "react", "react-native", "vue"]}>

{/* */}

</InlineFilter>
<InlineFilter filters={["android"]}>

{/* */}

</InlineFilter>
<InlineFilter filters={["flutter"]}>

{/* */}

</InlineFilter>
<InlineFilter filters={["swift"]}>

{/* */}

</InlineFilter>

### WebAuthn Passkeys

{/* blurb with supplemental information about handling sign-in, events, etc. */}

<InlineFilter filters={["angular", "javascript", "nextjs", "react", "react-native", "vue"]}>

{/* */}

</InlineFilter>
<InlineFilter filters={["android"]}>

{/* */}

</InlineFilter>
<InlineFilter filters={["flutter"]}>

{/* */}

</InlineFilter>
<InlineFilter filters={["swift"]}>

{/* */}

</InlineFilter>
Original file line number Diff line number Diff line change
Expand Up @@ -527,3 +527,83 @@ export default function App() {

</InlineFilter>
</InlineFilter>

## Sign up with passwordless methods

Your application's users can also sign up using passwordless methods. To learn more, visit the [concepts page for passwordless](/[platform]/build-a-backend/auth/concepts/passwordless/)

### SMS OTP

{/* blurb with supplemental information about handling sign-up, events, etc. */}

<InlineFilter filters={["angular", "javascript", "nextjs", "react", "react-native", "vue"]}>

{/* */}

</InlineFilter>
<InlineFilter filters={["android"]}>

{/* */}

</InlineFilter>
<InlineFilter filters={["flutter"]}>

{/* */}

</InlineFilter>
<InlineFilter filters={["swift"]}>

{/* */}

</InlineFilter>

### Email OTP

{/* blurb with supplemental information about handling sign-up, events, etc. */}

<InlineFilter filters={["angular", "javascript", "nextjs", "react", "react-native", "vue"]}>

{/* */}

</InlineFilter>
<InlineFilter filters={["android"]}>

{/* */}

</InlineFilter>
<InlineFilter filters={["flutter"]}>

{/* */}

</InlineFilter>
<InlineFilter filters={["swift"]}>

{/* */}

</InlineFilter>

### WebAuthn Passkeys

{/* blurb with supplemental information about handling sign-up, events, etc. */}

<InlineFilter filters={["angular", "javascript", "nextjs", "react", "react-native", "vue"]}>

{/* */}

</InlineFilter>
<InlineFilter filters={["android"]}>

{/* */}

</InlineFilter>
<InlineFilter filters={["flutter"]}>

{/* */}

</InlineFilter>
<InlineFilter filters={["swift"]}>

{/* */}

</InlineFilter>

Original file line number Diff line number Diff line change
Expand Up @@ -544,3 +544,6 @@ cfnUserPool.policies = {
},
};
```

## Add passwords to passwordless users

Loading