You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/auth/http.rst
+80Lines changed: 80 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,86 @@ POST /register
29
29
30
30
Register a new user with email and password.
31
31
32
+
**Request Body (JSON):**
33
+
34
+
* ``email`` (string, required): The user's email address.
35
+
* ``password`` (string, required): The user's desired password.
36
+
* ``provider`` (string, required): The name of the provider to use (e.g., "emailpassword").
37
+
* ``challenge`` (string, optional): A PKCE code challenge. This is required if the provider is configured with ``require_verification: false``.
38
+
* ``redirect_to`` (string, optional): A URL to redirect to upon successful registration.
39
+
* ``verify_url`` (string, optional): The base URL for the email verification link. If not provided, it defaults to ``<auth_server_base_url>/ui/verify``. The verification token will be appended as a query parameter to this URL.
40
+
* ``redirect_on_failure`` (string, optional): A URL to redirect to if registration fails.
41
+
42
+
**Response:**
43
+
44
+
The behavior of the response depends on the request parameters and server-side provider configuration (specifically, ``require_verification``).
45
+
46
+
1. **Successful Registration with Email Verification Required:**
47
+
48
+
* This occurs if the provider has ``require_verification: true``.
49
+
* A verification email is sent to the user.
50
+
* If ``redirect_to`` is provided in the request:
51
+
52
+
* A 302 redirect to the ``redirect_to`` URL occurs.
53
+
* The redirect URL will include ``identity_id`` and ``verification_email_sent_at`` as query parameters.
54
+
55
+
* If ``redirect_to`` is NOT provided:
56
+
57
+
* A 201 Created response is returned with a JSON body:
0 commit comments