-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Merged
Merged
Add passwordless #8127
Changes from 15 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
c3bb756
initial ia
josefaidt efba5a9
concept boilerplate
josefaidt 848cf3b
add code snippet placeholders, cross links, warning for backend support
josefaidt f251ae7
chore(auth): add swift passwordless sign up/auto sign in changes (#8128)
thisisabhash 9d5021b
Apply suggestions from code review
harsh62 fc594dd
rm comments, stale sections
josefaidt 9e63ab6
chore: add new steps and new flow type
harsh62 2a58005
chore(auth): add swift passwordless sign in/web authn changes (#8131)
thisisabhash 4e08e55
chore(auth): update swift passwordless autosignin Combine snippets (#…
thisisabhash 91241f7
chore(auth): add js passwordless changes (#8129)
scanlonp 8c3ef69
merge main
josefaidt 7101a87
resolve structural issues
jjarvisp 7d963b7
fix extra closing tag
jjarvisp fbccf5e
filter passwordless blocks
jjarvisp 0c083e3
Update src/pages/[platform]/build-a-backend/auth/concepts/passwordles…
josefaidt 65e2f24
revert auth flow order change
jjarvisp 2edd2c3
update user auth flow description
jjarvisp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1614,6 +1614,7 @@ | |
"ampx", | ||
"autodetection", | ||
"jamba", | ||
"webauthn", | ||
"knowledgebases", | ||
"rehype" | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
147 changes: 147 additions & 0 deletions
147
src/pages/[platform]/build-a-backend/auth/concepts/passwordless/index.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
import { getCustomStaticPath } from '@/utils/getCustomStaticPath'; | ||
|
||
export const meta = { | ||
title: 'Passwordless', | ||
description: 'Learn how to configure passwordless sign-in flows', | ||
platforms: [ | ||
'android', | ||
'angular', | ||
'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://github.com/aws-amplify/amplify-backend/issues/2276) | ||
|
||
</Callout> | ||
|
||
{/* need a section about what a "preferred" factor is */} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ? |
||
|
||
## 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 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"]}> | ||
|
||
{/* */} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ? |
||
|
||
</InlineFilter> | ||
<InlineFilter filters={["android"]}> | ||
|
||
{/* */} | ||
|
||
</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 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={["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={["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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?