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 user verification journey to auth docs #1548

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ebenezerdon
Copy link
Contributor

@ebenezerdon ebenezerdon commented Dec 11, 2024

What does this PR do?

Adds user verification as a new journey in the auth documentation.

  • Creates a new verification journey page that documents:
    • Email verification flow
    • Role-based access control
    • Verification events
  • Adds user verification to the auth journeys navigation sidebar

Test Plan

  • Run the app and navigate to /docs/products/auth/verification
  • Verify that the verification journey appears in the auth sidebar under "Journeys"
  • Check that all code examples in the verification page load correctly and are accurate

Related PRs and Issues

DRL-1115

- Add new verification journey page
- Add verification to auth journeys navigation
@coolify-appwrite-org
Copy link

coolify-appwrite-org bot commented Dec 11, 2024

The preview deployment is ready. 🟢

Open Preview | Open Build Logs

Last updated at: 2024-12-13 20:32:19 CET

@adityaoberai
Copy link
Member

@ebenezerdon we should also add examples for client SDKs other than web

@tessamero tessamero requested a review from divanov11 December 18, 2024 14:32
Comment on lines +97 to +98
label: 'User verification',
href: '/docs/products/auth/verification'
Copy link
Contributor

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

Suggested change
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
Copy link
Contributor

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 %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# 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:
Copy link
Contributor

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 %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Role-based access {% #role-based-access %}
# Restrict access {% #restrict-access %}

```
{% /multicode %}

# Phone verification {% #phone-verification %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# 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.
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants