|
| 1 | +.. _ref_auth_http: |
| 2 | + |
| 3 | +======== |
| 4 | +HTTP API |
| 5 | +======== |
| 6 | + |
| 7 | +Your application server will interact with the Gel extension primarily by sending HTTP requests to the Gel server. This page describes the HTTP API exposed by the Gel server. For more in-depth guidance about integrating Gel Auth into your application, see :ref:`ref_guide_auth` for a reference example. |
| 8 | + |
| 9 | +The following sections are organized by authentication type. |
| 10 | + |
| 11 | +Responses |
| 12 | +========= |
| 13 | + |
| 14 | +Responses typically include a JSON object that include a ``code`` property that can be exchanged for an access token by providing the matching PKCE verifier associated with the ``code``. Some endpoints can be configured to return responses as redirects and include response data in the redirect location's query string. |
| 15 | + |
| 16 | +General |
| 17 | +======= |
| 18 | + |
| 19 | +POST /token |
| 20 | +----------- |
| 21 | + |
| 22 | +PKCE token exchange endpoint. |
| 23 | + |
| 24 | +Email and password |
| 25 | +================== |
| 26 | + |
| 27 | +POST /register |
| 28 | +-------------- |
| 29 | + |
| 30 | +Register a new user with email and password. |
| 31 | + |
| 32 | +POST /authenticate |
| 33 | +------------------ |
| 34 | + |
| 35 | +Authenticate a user using email and password. |
| 36 | + |
| 37 | +POST /send-reset-email |
| 38 | +---------------------- |
| 39 | + |
| 40 | +Send a reset email to a user. |
| 41 | + |
| 42 | +POST /reset-password |
| 43 | +-------------------- |
| 44 | + |
| 45 | +Reset a user's password. |
| 46 | + |
| 47 | +POST /verify |
| 48 | +------------ |
| 49 | + |
| 50 | +Verify a user's email. |
| 51 | + |
| 52 | +POST /resend-verification-email |
| 53 | +------------------------------- |
| 54 | + |
| 55 | +Resend a verification email to a user. |
| 56 | + |
| 57 | + |
| 58 | +OAuth |
| 59 | +===== |
| 60 | + |
| 61 | +POST /authorize |
| 62 | +--------------- |
| 63 | + |
| 64 | +Initiate an OAuth authorization flow. |
| 65 | + |
| 66 | +POST /callback |
| 67 | +-------------- |
| 68 | + |
| 69 | +Handle the redirect from the OAuth provider. |
| 70 | + |
| 71 | +WebAuthn |
| 72 | +======== |
| 73 | + |
| 74 | +POST /webauthn/register |
| 75 | +----------------------- |
| 76 | + |
| 77 | +Register a new WebAuthn credential. |
| 78 | + |
| 79 | +POST /webauthn/authenticate |
| 80 | +--------------------------- |
| 81 | + |
| 82 | +Authenticate a user using a WebAuthn credential. |
| 83 | + |
| 84 | +GET /webauthn/register/options |
| 85 | +------------------------------ |
| 86 | + |
| 87 | +Get options for WebAuthn registration. |
| 88 | + |
| 89 | +GET /webauthn/authenticate/options |
| 90 | +---------------------------------- |
| 91 | + |
| 92 | +Get options for WebAuthn authentication. |
| 93 | + |
| 94 | +POST /verify |
| 95 | +------------ |
| 96 | + |
| 97 | +Verify a user's email. |
| 98 | + |
| 99 | +POST /resend-verification-email |
| 100 | +------------------------------- |
| 101 | + |
| 102 | +Resend a verification email to a user. |
| 103 | + |
| 104 | +Magic link |
| 105 | +========== |
| 106 | + |
| 107 | +POST /magic-link/register |
| 108 | +------------------------- |
| 109 | + |
| 110 | +Register a new magic link credential. |
| 111 | + |
| 112 | +POST /magic-link/email |
| 113 | +---------------------- |
| 114 | + |
| 115 | +Send a magic link email to a user. |
| 116 | + |
| 117 | +POST /magic-link/authenticate |
| 118 | +----------------------------- |
| 119 | + |
| 120 | +Sign in a user using the token created in a Magic Link email. |
0 commit comments