-
Notifications
You must be signed in to change notification settings - Fork 217
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 user verification journey to auth docs #1548
base: main
Are you sure you want to change the base?
Conversation
- Add new verification journey page - Add verification to auth journeys navigation
The preview deployment is ready. 🟢 Open Preview | Open Build Logs Last updated at: 2024-12-13 20:32:19 CET |
@ebenezerdon we should also add examples for client SDKs other than web |
label: 'User verification', | ||
href: '/docs/products/auth/verification' |
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.
We should stick to simple verbs
label: 'User verification', | |
href: '/docs/products/auth/verification' | |
label: 'Verify user', | |
href: '/docs/products/auth/verify-user' |
@@ -0,0 +1,282 @@ | |||
--- | |||
layout: article | |||
title: User verification |
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.
Verify user
|
||
User verification in Appwrite allows you to verify user email addresses and phone numbers. Users don't need to be verified to log in, but you can restrict resource access to verified users only using permissions. | ||
|
||
# Email verification {% #email-verification %} |
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.
# Email verification {% #email-verification %} | |
# Verify email {% #verify-email %} |
|
||
# Email verification {% #email-verification %} | ||
|
||
To verify a user's email, first send a verification email with a redirect URL. The verification secrets will be appended as query parameters to the redirect URL: |
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.
We should clarify the user needs to log in first before they can call account.createVerification()
.
Also, let's not use colons before the code samples as we don't do that elsewhere.
``` | ||
{% /multicode %} | ||
|
||
# Role-based access {% #role-based-access %} |
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.
# Role-based access {% #role-based-access %} | |
# Restrict access {% #restrict-access %} |
``` | ||
{% /multicode %} | ||
|
||
# Phone verification {% #phone-verification %} |
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.
# Phone verification {% #phone-verification %} | |
# Verify phone {% #verify-phone %} |
|
||
# Role-based access {% #role-based-access %} | ||
|
||
You can restrict resource access to verified users only using permissions through the `user([USER_ID], "verified")` role. This role is automatically assigned after successful verification. |
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.
This would restrict for a single user. Let's also mention users('verified')
to restrict access to all/any verified user.
What does this PR do?
Adds user verification as a new journey in the auth documentation.
Test Plan
/docs/products/auth/verification
Related PRs and Issues
DRL-1115