picked 0.0.101-next.2 → 0.0.101
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -12
- package/docs/explanation/conditions-and-the-logic-engine.md +94 -0
- package/docs/explanation/content-references.md +99 -0
- package/docs/explanation/feature-flag-allocation.md +218 -0
- package/docs/explanation/how-picked-works.md +124 -0
- package/docs/explanation/how-pickedql-works.md +76 -0
- package/docs/explanation/pages-and-flows.md +64 -0
- package/docs/explanation/the-content-model.md +87 -0
- package/docs/explanation/the-two-apis.md +68 -0
- package/docs/explanation/why-server-side-rendering.md +76 -0
- package/docs/explanation/workspaces-and-versions.md +71 -0
- package/docs/how-to/add-a-step-field-or-action.md +56 -0
- package/docs/how-to/analytics/index.md +324 -0
- package/docs/how-to/archive-or-delete-a-workspace.md +59 -0
- package/docs/how-to/authenticate-the-cli.md +101 -0
- package/docs/how-to/authenticate-with-a-magic-link.md +56 -0
- package/docs/how-to/authenticate-with-a-password.md +68 -0
- package/docs/how-to/authenticate-with-an-api-key.md +60 -0
- package/docs/how-to/authenticate-with-oauth.md +49 -0
- package/docs/how-to/build-a-flow.md +106 -0
- package/docs/how-to/call-an-external-api-from-a-workflow.md +116 -0
- package/docs/how-to/connect-the-mcp-server.md +46 -0
- package/docs/how-to/create-a-content-entry.md +58 -0
- package/docs/how-to/create-a-project.md +40 -0
- package/docs/how-to/create-an-experience.md +51 -0
- package/docs/how-to/create-and-revoke-an-api-key.md +54 -0
- package/docs/how-to/debug-with-the-chrome-extension.md +57 -0
- package/docs/how-to/define-a-page-layout.md +54 -0
- package/docs/how-to/fill-and-publish-a-page.md +82 -0
- package/docs/how-to/install-the-gtm-template.md +84 -0
- package/docs/how-to/install-the-sdk.md +93 -0
- package/docs/how-to/install-the-vite-plugin.md +69 -0
- package/docs/how-to/invite-and-remove-members.md +45 -0
- package/docs/how-to/point-one-entry-at-another.md +75 -0
- package/docs/how-to/preview-a-workspace.md +39 -0
- package/docs/how-to/publish-a-workspace.md +42 -0
- package/docs/how-to/read-a-feature-flag.md +113 -0
- package/docs/how-to/read-a-referenced-entry.md +109 -0
- package/docs/how-to/register-a-component.md +55 -0
- package/docs/how-to/register-an-action-handler.md +85 -0
- package/docs/how-to/register-an-api-that-uses-oauth2.md +107 -0
- package/docs/how-to/render-a-step-form.md +131 -0
- package/docs/how-to/render-an-unpublished-preview.md +41 -0
- package/docs/how-to/retry-a-failed-call-with-a-loop.md +81 -0
- package/docs/how-to/reuse-a-section.md +64 -0
- package/docs/how-to/reuse-a-step-field-or-action.md +39 -0
- package/docs/how-to/roll-back-a-published-version.md +39 -0
- package/docs/how-to/run-an-ab-test.md +59 -0
- package/docs/how-to/run-code-on-a-form-submission.md +125 -0
- package/docs/how-to/server-render-a-page.md +81 -0
- package/docs/how-to/set-a-content-security-policy.md +32 -0
- package/docs/how-to/set-up-mfa.md +126 -0
- package/docs/how-to/switch-workspaces.md +122 -0
- package/docs/how-to/upload-and-use-an-asset.mdx +87 -0
- package/docs/how-to/validate-a-field.md +52 -0
- package/docs/how-to/wait-for-an-action-response.md +182 -0
- package/docs/how-to/write-a-condition.md +57 -0
- package/docs/how-to/write-a-predicate.md +60 -0
- package/docs/index.md +59 -0
- package/docs/reference/dashboard/actions.mdx +65 -0
- package/docs/reference/dashboard/api-keys.mdx +47 -0
- package/docs/reference/dashboard/conditions.mdx +51 -0
- package/docs/reference/dashboard/content/asset-library.mdx +74 -0
- package/docs/reference/dashboard/content/blocks.mdx +66 -0
- package/docs/reference/dashboard/content/content-entries.mdx +109 -0
- package/docs/reference/dashboard/content/models.mdx +119 -0
- package/docs/reference/dashboard/content/pages.mdx +72 -0
- package/docs/reference/dashboard/experiences.mdx +61 -0
- package/docs/reference/dashboard/external-apis.md +182 -0
- package/docs/reference/dashboard/features.mdx +165 -0
- package/docs/reference/dashboard/fields.mdx +120 -0
- package/docs/reference/dashboard/flow-builder/canvas.mdx +58 -0
- package/docs/reference/dashboard/flow-builder/condition-builder.md +69 -0
- package/docs/reference/dashboard/flow-builder/keyboard-shortcuts.md +72 -0
- package/docs/reference/dashboard/flow-builder/nodes.md +74 -0
- package/docs/reference/dashboard/labels.md +321 -0
- package/docs/reference/dashboard/lead-search.md +235 -0
- package/docs/reference/dashboard/projects.mdx +53 -0
- package/docs/reference/dashboard/reports.mdx +53 -0
- package/docs/reference/dashboard/steps.mdx +47 -0
- package/docs/reference/dashboard/team-management.md +38 -0
- package/docs/reference/dashboard/workflow-runs.md +157 -0
- package/docs/reference/dashboard/workflow-templates.md +182 -0
- package/docs/reference/dashboard/workflow-test-runs.md +85 -0
- package/docs/reference/dashboard/workspace-versioning.mdx +42 -0
- package/docs/reference/dashboard/workspaces.mdx +91 -0
- package/docs/reference/delivery-api/experience-content.md +152 -0
- package/docs/reference/delivery-api/index.md +45 -0
- package/docs/reference/delivery-api/preview-caching-crawling.md +79 -0
- package/docs/reference/delivery-api/project-config.md +65 -0
- package/docs/reference/delivery-api/workspace-schema.md +107 -0
- package/docs/reference/glossary.md +201 -0
- package/docs/reference/management-api/authentication.md +87 -0
- package/docs/reference/management-api/authorization-and-scopes.md +291 -0
- package/docs/reference/management-api/error-handling.md +232 -0
- package/docs/reference/management-api/pagination.md +192 -0
- package/docs/reference/management-api/schema/action.md +261 -0
- package/docs/reference/management-api/schema/analytics-session.md +363 -0
- package/docs/reference/management-api/schema/analytics.md +73 -0
- package/docs/reference/management-api/schema/api-key.md +170 -0
- package/docs/reference/management-api/schema/auth.md +1177 -0
- package/docs/reference/management-api/schema/cms-fields.md +954 -0
- package/docs/reference/management-api/schema/cms-models.md +1155 -0
- package/docs/reference/management-api/schema/common.md +362 -0
- package/docs/reference/management-api/schema/condition.md +254 -0
- package/docs/reference/management-api/schema/design-system.md +199 -0
- package/docs/reference/management-api/schema/experience.md +1098 -0
- package/docs/reference/management-api/schema/external-api.md +637 -0
- package/docs/reference/management-api/schema/feature.md +350 -0
- package/docs/reference/management-api/schema/feedback.md +103 -0
- package/docs/reference/management-api/schema/field.md +400 -0
- package/docs/reference/management-api/schema/index.md +243 -0
- package/docs/reference/management-api/schema/integration.md +272 -0
- package/docs/reference/management-api/schema/label.md +349 -0
- package/docs/reference/management-api/schema/lead.md +340 -0
- package/docs/reference/management-api/schema/mcp-server.md +299 -0
- package/docs/reference/management-api/schema/metric.md +223 -0
- package/docs/reference/management-api/schema/operation.md +96 -0
- package/docs/reference/management-api/schema/organization.md +749 -0
- package/docs/reference/management-api/schema/project.md +607 -0
- package/docs/reference/management-api/schema/report.md +243 -0
- package/docs/reference/management-api/schema/saved-view.md +288 -0
- package/docs/reference/management-api/schema/shopify.md +795 -0
- package/docs/reference/management-api/schema/step.md +273 -0
- package/docs/reference/management-api/schema/tenant-branding.md +185 -0
- package/docs/reference/management-api/schema/workbench.md +246 -0
- package/docs/reference/management-api/schema/workflow-run.md +263 -0
- package/docs/reference/management-api/schema/workflow.md +1110 -0
- package/docs/reference/management-api/schema/workspace-version.md +823 -0
- package/docs/reference/management-api/schema/workspace.md +917 -0
- package/docs/reference/pickedql/data-sources.md +174 -0
- package/docs/reference/pickedql/dimensions.md +103 -0
- package/docs/reference/pickedql/filtering.md +64 -0
- package/docs/reference/pickedql/index.md +18 -0
- package/docs/reference/pickedql/schema.md +172 -0
- package/docs/reference/pickedql/virtual-functions.md +248 -0
- package/docs/reference/sdk/actions.md +154 -0
- package/docs/reference/sdk/analytics-events.md +453 -0
- package/docs/reference/sdk/conditions.md +147 -0
- package/docs/reference/sdk/content-security-policy.md +21 -0
- package/docs/reference/sdk/content.md +253 -0
- package/docs/reference/sdk/experiences.md +51 -0
- package/docs/reference/sdk/features.md +256 -0
- package/docs/reference/sdk/fields.md +255 -0
- package/docs/reference/sdk/index.md +68 -0
- package/docs/reference/sdk/plugins/create-experience.md +123 -0
- package/docs/reference/sdk/plugins/dynamic-experiences.md +74 -0
- package/docs/reference/sdk/plugins/fingerprintjs.md +39 -0
- package/docs/reference/sdk/plugins/hotjar.md +60 -0
- package/docs/reference/sdk/plugins/index.md +33 -0
- package/docs/reference/sdk/plugins/sentry.md +51 -0
- package/docs/reference/sdk/plugins/shopify.md +109 -0
- package/docs/reference/sdk/plugins/window-object.md +25 -0
- package/docs/reference/sdk/predicates.md +43 -0
- package/docs/reference/sdk/react.md +61 -0
- package/docs/reference/sdk/ssr/index.md +33 -0
- package/docs/reference/sdk/ssr/rendering-and-hydration.md +103 -0
- package/docs/reference/sdk/ssr/serialize.md +80 -0
- package/docs/reference/sdk/ssr/slots-and-placements.md +113 -0
- package/docs/reference/sdk/steps.md +86 -0
- package/docs/reference/sdk/svelte.md +74 -0
- package/docs/reference/sdk/type-generation.md +265 -0
- package/docs/reference/tools/admin-api-client.md +89 -0
- package/docs/reference/tools/chrome-extension.md +16 -0
- package/docs/reference/tools/cli.md +319 -0
- package/docs/reference/tools/delivery-api-client.md +60 -0
- package/docs/reference/tools/image-optimisation-service.md +104 -0
- package/docs/reference/tools/mcp-run.md +121 -0
- package/docs/reference/tools/mcp.md +391 -0
- package/docs/reference/tools/vite-plugin.md +163 -0
- package/docs/tutorials/first-api-call.md +253 -0
- package/docs/tutorials/first-experience-in-the-dashboard.mdx +160 -0
- package/docs/tutorials/first-experience.mdx +254 -0
- package/docs/tutorials/first-server-rendered-page.mdx +186 -0
- package/package.json +8 -7
|
@@ -0,0 +1,1177 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: reference
|
|
3
|
+
layout: docs
|
|
4
|
+
generated: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Auth schema
|
|
8
|
+
|
|
9
|
+
The operations and types that `auth.graphql` adds to the Management API. See [Management API schema](/reference/management-api/schema) for every domain, the endpoint and authentication.
|
|
10
|
+
|
|
11
|
+
## Queries
|
|
12
|
+
|
|
13
|
+
### `user`
|
|
14
|
+
|
|
15
|
+
Fetch the currently authenticated user. Returns null if the request is unauthenticated. Exempt from the MFA policy, so a gated user can read `mfa` and `mfaFactors`.
|
|
16
|
+
|
|
17
|
+
```graphql
|
|
18
|
+
user: User @auth(mfa: EXEMPT)
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### `viewerScopes`
|
|
22
|
+
|
|
23
|
+
Root-level scopes for the authenticated user (e.g. `ORGANIZATION_CREATE`, `STAFF_READ`). Use `Organization.viewerScopes` for org-scoped scopes.
|
|
24
|
+
|
|
25
|
+
```graphql
|
|
26
|
+
viewerScopes: [Scope!]! @auth
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### `oauthConsentDetails`
|
|
30
|
+
|
|
31
|
+
Get OAuth consent authorisation details. Requires authentication (USER token only).
|
|
32
|
+
|
|
33
|
+
```graphql
|
|
34
|
+
oauthConsentDetails(input: OAuthConsentDetailsInput!): OAuthConsentDetailsPayload! @auth(only: USER)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Mutations
|
|
38
|
+
|
|
39
|
+
### `sessionStart`
|
|
40
|
+
|
|
41
|
+
Begin signing in with an email address alone. Answers `PASSWORD` when the
|
|
42
|
+
account has set a password, and otherwise emails a sign-in code and link and
|
|
43
|
+
answers `EMAIL_CODE`. Never creates an account. Returns `RATE_LIMITED` when
|
|
44
|
+
the caller makes too many requests, or when the project's email quota is spent.
|
|
45
|
+
|
|
46
|
+
```graphql
|
|
47
|
+
sessionStart(input: SessionStartInput!): SessionStartPayload!
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### `sessionCreate`
|
|
51
|
+
|
|
52
|
+
Create a new session by signing in with email and password.
|
|
53
|
+
|
|
54
|
+
```graphql
|
|
55
|
+
sessionCreate(input: SessionCreateInput!): SessionCreatePayload!
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### `sessionRefresh`
|
|
59
|
+
|
|
60
|
+
Refresh an existing session using a refresh token.
|
|
61
|
+
|
|
62
|
+
```graphql
|
|
63
|
+
sessionRefresh(input: SessionRefreshInput!): SessionRefreshPayload!
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### `accountCreate`
|
|
67
|
+
|
|
68
|
+
Register an email address and send it a confirmation email.
|
|
69
|
+
|
|
70
|
+
```graphql
|
|
71
|
+
accountCreate(input: AccountCreateInput!): AccountCreatePayload!
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### `accountVerifyEmail`
|
|
75
|
+
|
|
76
|
+
Verify a user's email address with a confirmation token.
|
|
77
|
+
|
|
78
|
+
```graphql
|
|
79
|
+
accountVerifyEmail(input: AccountVerifyEmailInput!): AccountVerifyEmailPayload!
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### `accountResendVerification`
|
|
83
|
+
|
|
84
|
+
Resend the email verification link.
|
|
85
|
+
|
|
86
|
+
```graphql
|
|
87
|
+
accountResendVerification(input: AccountResendVerificationInput!): AccountResendVerificationPayload!
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### `oauthAuthorize`
|
|
91
|
+
|
|
92
|
+
Initiate an OAuth authorisation flow.
|
|
93
|
+
|
|
94
|
+
```graphql
|
|
95
|
+
oauthAuthorize(input: OAuthAuthorizeInput!): OAuthAuthorizePayload!
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### `oauthCallback`
|
|
99
|
+
|
|
100
|
+
Handle the OAuth callback and create a session.
|
|
101
|
+
|
|
102
|
+
```graphql
|
|
103
|
+
oauthCallback(input: OAuthCallbackInput!): OAuthCallbackPayload!
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### `oauthConsentApprove`
|
|
107
|
+
|
|
108
|
+
Approve an OAuth consent request. Requires authentication.
|
|
109
|
+
|
|
110
|
+
```graphql
|
|
111
|
+
oauthConsentApprove(input: OAuthConsentApproveInput!): OAuthConsentActionPayload! @auth(only: USER)
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### `oauthConsentDeny`
|
|
115
|
+
|
|
116
|
+
Deny an OAuth consent request. Requires authentication.
|
|
117
|
+
|
|
118
|
+
```graphql
|
|
119
|
+
oauthConsentDeny(input: OAuthConsentDenyInput!): OAuthConsentActionPayload! @auth(only: USER)
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### `magicLinkSend`
|
|
123
|
+
|
|
124
|
+
Email an existing account a sign-in code and link. Never creates an account,
|
|
125
|
+
and answers `success: true` for an address with no account.
|
|
126
|
+
|
|
127
|
+
```graphql
|
|
128
|
+
magicLinkSend(input: MagicLinkSendInput!): MagicLinkSendPayload!
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### `magicLinkVerify`
|
|
132
|
+
|
|
133
|
+
Verify the code from a sign-in or confirmation email and create a session.
|
|
134
|
+
|
|
135
|
+
```graphql
|
|
136
|
+
magicLinkVerify(input: MagicLinkVerifyInput!): MagicLinkVerifyPayload!
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### `emailLinkVerify`
|
|
140
|
+
|
|
141
|
+
Verify the link from a password-reset, invitation, sign-in or confirmation
|
|
142
|
+
email and create a session. The link is single-use, so call this when the
|
|
143
|
+
recipient confirms, never on opening the link: an email security scanner that
|
|
144
|
+
opens links before delivery would otherwise use it up.
|
|
145
|
+
|
|
146
|
+
```graphql
|
|
147
|
+
emailLinkVerify(input: EmailLinkVerifyInput!): EmailLinkVerifyPayload!
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### `passwordResetSend`
|
|
151
|
+
|
|
152
|
+
Send a password reset email.
|
|
153
|
+
|
|
154
|
+
```graphql
|
|
155
|
+
passwordResetSend(input: PasswordResetSendInput!): PasswordResetSendPayload!
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### `passwordUpdate`
|
|
159
|
+
|
|
160
|
+
Update the current user's password. Requires authentication. An `AAL1` session
|
|
161
|
+
may set a password only while the user holds no verified factor, and is
|
|
162
|
+
otherwise refused with `MFA_REQUIRED`.
|
|
163
|
+
|
|
164
|
+
```graphql
|
|
165
|
+
passwordUpdate(input: PasswordUpdateInput!): PasswordUpdatePayload! @auth(mfa: EXEMPT)
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### `mfaFactorEnroll`
|
|
169
|
+
|
|
170
|
+
Enrol an authenticator app for the caller. Requires a user session; exempt from the MFA policy.
|
|
171
|
+
|
|
172
|
+
```graphql
|
|
173
|
+
mfaFactorEnroll(input: MfaFactorEnrollInput!): MfaFactorEnrollPayload! @auth(only: USER, mfa: EXEMPT)
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### `mfaChallengeCreate`
|
|
177
|
+
|
|
178
|
+
Open a challenge against one of the caller's factors. Requires a user session; exempt from the MFA policy.
|
|
179
|
+
|
|
180
|
+
```graphql
|
|
181
|
+
mfaChallengeCreate(input: MfaChallengeCreateInput!): MfaChallengeCreatePayload! @auth(only: USER, mfa: EXEMPT)
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### `mfaChallengeVerify`
|
|
185
|
+
|
|
186
|
+
Verify a code against a challenge and lift the caller's session to `AAL2`. Requires a user session; exempt from the MFA policy.
|
|
187
|
+
|
|
188
|
+
```graphql
|
|
189
|
+
mfaChallengeVerify(input: MfaChallengeVerifyInput!): MfaChallengeVerifyPayload! @auth(only: USER, mfa: EXEMPT)
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### `mfaFactorUnenroll`
|
|
193
|
+
|
|
194
|
+
Remove one of the caller's factors. Requires a user session; exempt from the MFA policy, though removing a verified factor needs `AAL2`.
|
|
195
|
+
|
|
196
|
+
```graphql
|
|
197
|
+
mfaFactorUnenroll(input: MfaFactorUnenrollInput!): MfaFactorUnenrollPayload! @auth(only: USER, mfa: EXEMPT)
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## Types
|
|
201
|
+
|
|
202
|
+
### `AuthErrorCode`
|
|
203
|
+
|
|
204
|
+
```graphql
|
|
205
|
+
"""
|
|
206
|
+
Programmatic error codes returned by auth use cases. Surfaced via the
|
|
207
|
+
standard GraphQL `errors` array's `extensions.code` when an `AuthError` is
|
|
208
|
+
thrown. Use these to drive client-side UX (e.g. show "invalid password"
|
|
209
|
+
vs "email not confirmed" messages) — do not parse the `message` string.
|
|
210
|
+
"""
|
|
211
|
+
enum AuthErrorCode {
|
|
212
|
+
"""The provided credentials are invalid (wrong password, unknown email)."""
|
|
213
|
+
INVALID_CREDENTIALS
|
|
214
|
+
"""
|
|
215
|
+
The user's email address has not yet been confirmed via the verification link.
|
|
216
|
+
"""
|
|
217
|
+
EMAIL_NOT_CONFIRMED
|
|
218
|
+
"""No user was found matching the provided criteria."""
|
|
219
|
+
USER_NOT_FOUND
|
|
220
|
+
"""A user with the provided email already exists."""
|
|
221
|
+
USER_ALREADY_EXISTS
|
|
222
|
+
"""
|
|
223
|
+
The provided password does not meet the strength requirements enforced by Supabase Auth.
|
|
224
|
+
"""
|
|
225
|
+
WEAK_PASSWORD
|
|
226
|
+
"""
|
|
227
|
+
The provided token is invalid (malformed, signature mismatch, or not issued by this server).
|
|
228
|
+
"""
|
|
229
|
+
INVALID_TOKEN
|
|
230
|
+
"""The provided token has expired."""
|
|
231
|
+
TOKEN_EXPIRED
|
|
232
|
+
"""
|
|
233
|
+
The MFA challenge verification failed (wrong code or rejected challenge).
|
|
234
|
+
"""
|
|
235
|
+
MFA_CHALLENGE_FAILED
|
|
236
|
+
"""
|
|
237
|
+
The specified MFA factor was not found, or does not belong to the caller.
|
|
238
|
+
"""
|
|
239
|
+
MFA_FACTOR_NOT_FOUND
|
|
240
|
+
"""
|
|
241
|
+
The caller must hold an `AAL2` session: they are staff, or a member of an
|
|
242
|
+
organisation that requires two-factor authentication, or the operation itself
|
|
243
|
+
needs a verified second factor (removing a verified factor). Verify a factor
|
|
244
|
+
with `mfaChallengeVerify` and retry with the returned session.
|
|
245
|
+
"""
|
|
246
|
+
MFA_REQUIRED
|
|
247
|
+
"""
|
|
248
|
+
An error occurred while exchanging credentials with the upstream OAuth provider.
|
|
249
|
+
"""
|
|
250
|
+
OAUTH_PROVIDER_ERROR
|
|
251
|
+
"""
|
|
252
|
+
Too many requests; the operation has been rate-limited by Supabase Auth.
|
|
253
|
+
"""
|
|
254
|
+
RATE_LIMITED
|
|
255
|
+
}
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### `AuthenticatorAssuranceLevel`
|
|
259
|
+
|
|
260
|
+
```graphql
|
|
261
|
+
"""
|
|
262
|
+
Authenticator Assurance Level — how many factors the active session has
|
|
263
|
+
satisfied. Conforms to the NIST 800-63 AAL definitions.
|
|
264
|
+
|
|
265
|
+
`AAL1` means the session is authenticated with a single factor (password
|
|
266
|
+
or OAuth). `AAL2` means the session has additionally verified a TOTP
|
|
267
|
+
factor. The level is decoded from the session's access token; a call that
|
|
268
|
+
lifts a session from `AAL1` to `AAL2` goes through `mfaChallengeVerify`.
|
|
269
|
+
"""
|
|
270
|
+
enum AuthenticatorAssuranceLevel {
|
|
271
|
+
"""Single-factor authentication (password or OAuth only)."""
|
|
272
|
+
AAL1
|
|
273
|
+
"""
|
|
274
|
+
Multi-factor authentication (a verified TOTP code on top of the first factor).
|
|
275
|
+
"""
|
|
276
|
+
AAL2
|
|
277
|
+
}
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### `IdentityProvider`
|
|
281
|
+
|
|
282
|
+
```graphql
|
|
283
|
+
"""
|
|
284
|
+
Identity provider types — which upstream issued the credential the user
|
|
285
|
+
authenticated with. A `User` may have multiple `Identity` records (e.g.
|
|
286
|
+
linked Google + password).
|
|
287
|
+
"""
|
|
288
|
+
enum IdentityProvider {
|
|
289
|
+
"""Email + password authentication."""
|
|
290
|
+
EMAIL
|
|
291
|
+
"""Google OAuth authentication."""
|
|
292
|
+
GOOGLE
|
|
293
|
+
}
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
### `OAuthProvider`
|
|
297
|
+
|
|
298
|
+
```graphql
|
|
299
|
+
"""
|
|
300
|
+
OAuth providers supported for end-user authentication. Used by
|
|
301
|
+
`oauthAuthorize` to select the provider URL to redirect the user to.
|
|
302
|
+
"""
|
|
303
|
+
enum OAuthProvider {
|
|
304
|
+
"""Google OAuth provider."""
|
|
305
|
+
GOOGLE
|
|
306
|
+
}
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
### `MfaFactorType`
|
|
310
|
+
|
|
311
|
+
```graphql
|
|
312
|
+
"""
|
|
313
|
+
MFA factor types. Time-based one-time passwords from an authenticator app are the only kind.
|
|
314
|
+
"""
|
|
315
|
+
enum MfaFactorType {
|
|
316
|
+
"""
|
|
317
|
+
An authenticator app generating time-based one-time passwords (RFC 6238).
|
|
318
|
+
"""
|
|
319
|
+
TOTP
|
|
320
|
+
}
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
### `MfaFactorStatus`
|
|
324
|
+
|
|
325
|
+
```graphql
|
|
326
|
+
"""
|
|
327
|
+
MFA factor verification status. A factor created by `mfaFactorEnroll`
|
|
328
|
+
starts as `UNVERIFIED`; once the user verifies a code from their
|
|
329
|
+
authenticator via `mfaChallengeVerify`, it transitions to `VERIFIED`.
|
|
330
|
+
"""
|
|
331
|
+
enum MfaFactorStatus {
|
|
332
|
+
"""
|
|
333
|
+
Factor has been enrolled but the user has not yet verified a delivered code.
|
|
334
|
+
"""
|
|
335
|
+
UNVERIFIED
|
|
336
|
+
"""Factor has been verified and is active."""
|
|
337
|
+
VERIFIED
|
|
338
|
+
}
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
### `MfaState`
|
|
342
|
+
|
|
343
|
+
```graphql
|
|
344
|
+
"""
|
|
345
|
+
Whether a user has completed multi-factor authentication enrolment. `ENROLLED`
|
|
346
|
+
means at least one verified MFA factor exists for the user; `NOT_ENROLLED` means
|
|
347
|
+
none does. Shown beside a user in every dashboard list of users.
|
|
348
|
+
"""
|
|
349
|
+
enum MfaState {
|
|
350
|
+
"""The user holds at least one verified MFA factor."""
|
|
351
|
+
ENROLLED
|
|
352
|
+
"""The user holds no verified MFA factor."""
|
|
353
|
+
NOT_ENROLLED
|
|
354
|
+
}
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
### `Identity`
|
|
358
|
+
|
|
359
|
+
```graphql
|
|
360
|
+
"""
|
|
361
|
+
A linked identity for an authenticated user — one record per
|
|
362
|
+
identity-provider account. The same `User` may have several `Identity`
|
|
363
|
+
rows (e.g. a Google sign-in and a separately-enrolled email/password).
|
|
364
|
+
"""
|
|
365
|
+
type Identity {
|
|
366
|
+
"""Unique identifier for this identity record."""
|
|
367
|
+
id: ID!
|
|
368
|
+
"""The identity provider that issued this identity."""
|
|
369
|
+
provider: IdentityProvider!
|
|
370
|
+
"""
|
|
371
|
+
Email address associated with this identity, as reported by the provider.
|
|
372
|
+
"""
|
|
373
|
+
email: String
|
|
374
|
+
"""
|
|
375
|
+
Provider-specific metadata blob (claims, profile fields). Shape varies by provider.
|
|
376
|
+
"""
|
|
377
|
+
identityData: JSON
|
|
378
|
+
"""When this identity was created."""
|
|
379
|
+
createdAt: DateTime!
|
|
380
|
+
"""When the user last signed in with this identity."""
|
|
381
|
+
lastSignInAt: DateTime
|
|
382
|
+
}
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
### `MfaFactor`
|
|
386
|
+
|
|
387
|
+
```graphql
|
|
388
|
+
"""
|
|
389
|
+
An MFA factor enrolled by a user: an authenticator app holding a TOTP
|
|
390
|
+
secret.
|
|
391
|
+
|
|
392
|
+
A user may have multiple enrolled factors; `mfaChallengeCreate` selects
|
|
393
|
+
which factor to challenge against. Unenrolment is via `mfaFactorUnenroll`;
|
|
394
|
+
removing a `VERIFIED` factor needs an `AAL2` session, and removing the last
|
|
395
|
+
one leaves an MFA-required user gated to setup on their next request.
|
|
396
|
+
"""
|
|
397
|
+
type MfaFactor {
|
|
398
|
+
"""Unique identifier for this MFA factor."""
|
|
399
|
+
id: ID!
|
|
400
|
+
"""The type of MFA factor."""
|
|
401
|
+
factorType: MfaFactorType!
|
|
402
|
+
"""
|
|
403
|
+
Whether the user has completed the initial verification flow for this factor.
|
|
404
|
+
"""
|
|
405
|
+
status: MfaFactorStatus!
|
|
406
|
+
"""User-assigned name for this factor (e.g. "Work phone")."""
|
|
407
|
+
friendlyName: String
|
|
408
|
+
"""When this factor was enrolled."""
|
|
409
|
+
createdAt: DateTime!
|
|
410
|
+
}
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
### `MfaTotpEnrollment`
|
|
414
|
+
|
|
415
|
+
```graphql
|
|
416
|
+
"""
|
|
417
|
+
What an authenticator app needs to add a newly enrolled TOTP factor. Shown
|
|
418
|
+
once, by `mfaFactorEnroll`; the secret is never returned again.
|
|
419
|
+
"""
|
|
420
|
+
type MfaTotpEnrollment {
|
|
421
|
+
"""
|
|
422
|
+
SVG markup of the QR code that encodes `uri`, for scanning with an authenticator app.
|
|
423
|
+
"""
|
|
424
|
+
qrCode: String!
|
|
425
|
+
"""The base32 secret, for typing into an authenticator that cannot scan."""
|
|
426
|
+
secret: String!
|
|
427
|
+
"""The `otpauth://` URI the QR code encodes."""
|
|
428
|
+
uri: String!
|
|
429
|
+
}
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
### `MfaRequirementReason`
|
|
433
|
+
|
|
434
|
+
```graphql
|
|
435
|
+
"""Why a user must hold a verified second factor."""
|
|
436
|
+
enum MfaRequirementReason {
|
|
437
|
+
"""The user is a super admin or a client manager."""
|
|
438
|
+
STAFF
|
|
439
|
+
"""The user belongs to an organisation whose `requireMfa` setting is on."""
|
|
440
|
+
ORGANIZATION
|
|
441
|
+
}
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
### `UserMfaStatus`
|
|
445
|
+
|
|
446
|
+
```graphql
|
|
447
|
+
"""
|
|
448
|
+
Where a user stands against the multi-factor authentication policy.
|
|
449
|
+
`required` and `reason` come from the policy (staff status and organisation
|
|
450
|
+
membership); `enrolled` is whether a `VERIFIED` TOTP factor exists;
|
|
451
|
+
`satisfied` is whether the requirement is met by the token this status was
|
|
452
|
+
read with: not required, or a session at `AAL2`.
|
|
453
|
+
"""
|
|
454
|
+
type UserMfaStatus {
|
|
455
|
+
"""Whether the user must hold an `AAL2` session to use guarded fields."""
|
|
456
|
+
required: Boolean!
|
|
457
|
+
"""Why the user is required; null when `required` is false."""
|
|
458
|
+
reason: MfaRequirementReason
|
|
459
|
+
"""Whether the user holds at least one `VERIFIED` TOTP factor."""
|
|
460
|
+
enrolled: Boolean!
|
|
461
|
+
"""
|
|
462
|
+
Whether the requirement is met by the session this status was read with.
|
|
463
|
+
"""
|
|
464
|
+
satisfied: Boolean!
|
|
465
|
+
}
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
### `User`
|
|
469
|
+
|
|
470
|
+
```graphql
|
|
471
|
+
"""
|
|
472
|
+
The authenticated end-user. Returned by the `user` query when a valid
|
|
473
|
+
`Authorization: Bearer <jwt>` header is present; otherwise the field
|
|
474
|
+
resolves to null.
|
|
475
|
+
|
|
476
|
+
Carries the user's identifiers, all linked identity providers, all
|
|
477
|
+
enrolled MFA factors, where the user stands against the MFA policy, and
|
|
478
|
+
convenience navigation into the user's pending invitations and joined
|
|
479
|
+
organisations. The `appMetadata` blob is server-managed and read-only;
|
|
480
|
+
`userMetadata` is user-editable.
|
|
481
|
+
|
|
482
|
+
The `user` query is exempt from the MFA policy so a gated user can read
|
|
483
|
+
their status; `invitations` and `organizations` are enforced fields, so
|
|
484
|
+
they error with `MFA_REQUIRED` for a user the policy gates.
|
|
485
|
+
"""
|
|
486
|
+
type User {
|
|
487
|
+
"""Unique user identifier (Supabase Auth `auth.users.id`)."""
|
|
488
|
+
id: ID!
|
|
489
|
+
"""
|
|
490
|
+
User's primary email address. Null only for users created via certain admin paths without a confirmed email.
|
|
491
|
+
"""
|
|
492
|
+
email: String
|
|
493
|
+
"""When the user's email was confirmed (null if still pending)."""
|
|
494
|
+
emailConfirmedAt: DateTime
|
|
495
|
+
"""User's phone number (E.164 format), if added via MFA or admin path."""
|
|
496
|
+
phone: String
|
|
497
|
+
"""When the user's phone was confirmed (null if unverified)."""
|
|
498
|
+
phoneConfirmedAt: DateTime
|
|
499
|
+
"""All identities linked to this user (one per `IdentityProvider`)."""
|
|
500
|
+
identities: [Identity!]!
|
|
501
|
+
"""All TOTP factors enrolled by this user, verified or not."""
|
|
502
|
+
mfaFactors: [MfaFactor!]!
|
|
503
|
+
"""Where this user stands against the multi-factor authentication policy."""
|
|
504
|
+
mfa: UserMfaStatus!
|
|
505
|
+
"""
|
|
506
|
+
Whether this user has chosen a password. False for an account created by a
|
|
507
|
+
one-time code, an invitation or Google until `passwordUpdate` sets one.
|
|
508
|
+
"""
|
|
509
|
+
passwordSet: Boolean!
|
|
510
|
+
"""
|
|
511
|
+
Server-managed metadata (provider claims, role flags). Read-only from the user's perspective.
|
|
512
|
+
"""
|
|
513
|
+
appMetadata: JSON
|
|
514
|
+
"""User-editable metadata (display name, preferences). Free-form JSON."""
|
|
515
|
+
userMetadata: JSON
|
|
516
|
+
"""When this user account was created."""
|
|
517
|
+
createdAt: DateTime!
|
|
518
|
+
"""When this user account was last updated."""
|
|
519
|
+
updatedAt: DateTime!
|
|
520
|
+
"""
|
|
521
|
+
Pending organisation invitations addressed to this user's email. Held to the MFA policy.
|
|
522
|
+
"""
|
|
523
|
+
invitations(first: Int, after: String): ViewerInvitationConnection! @auth
|
|
524
|
+
"""
|
|
525
|
+
Organisations this user is a member of. Filter by name with `search`
|
|
526
|
+
(case-insensitive substring) and order with `sortKey` (default `NAME`) plus
|
|
527
|
+
`reverse`. Held to the MFA policy.
|
|
528
|
+
"""
|
|
529
|
+
organizations(first: Int, after: String, search: String, sortKey: OrganizationSortKeys = NAME, reverse: Boolean = false): OrganizationConnection! @auth
|
|
530
|
+
}
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
### `Session`
|
|
534
|
+
|
|
535
|
+
```graphql
|
|
536
|
+
"""
|
|
537
|
+
A successfully-authenticated session. Returned by every auth flow that
|
|
538
|
+
produces a usable JWT (`sessionCreate`, `accountVerifyEmail`,
|
|
539
|
+
`magicLinkVerify`, `mfaChallengeVerify`, etc.).
|
|
540
|
+
|
|
541
|
+
Pass `accessToken` in the `Authorization: Bearer <token>` header on
|
|
542
|
+
subsequent requests. When `accessToken` is near expiry, exchange
|
|
543
|
+
`refreshToken` for a fresh session via `sessionRefresh`. Sessions also
|
|
544
|
+
carry the current authenticator assurance level, decoded from
|
|
545
|
+
`accessToken`, and `user.mfa` says whether that level is enough.
|
|
546
|
+
"""
|
|
547
|
+
type Session {
|
|
548
|
+
"""JWT access token for authenticating API requests."""
|
|
549
|
+
accessToken: String!
|
|
550
|
+
"""
|
|
551
|
+
Refresh token used to obtain a new access token. Single-use; rotates on every refresh.
|
|
552
|
+
"""
|
|
553
|
+
refreshToken: String!
|
|
554
|
+
"""
|
|
555
|
+
When the access token expires (Supabase Auth issues 1-hour tokens by default).
|
|
556
|
+
"""
|
|
557
|
+
expiresAt: DateTime!
|
|
558
|
+
"""The authenticated user."""
|
|
559
|
+
user: User!
|
|
560
|
+
"""
|
|
561
|
+
Current authenticator assurance level of this session, decoded from `accessToken`.
|
|
562
|
+
"""
|
|
563
|
+
aal: AuthenticatorAssuranceLevel!
|
|
564
|
+
}
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
### `SessionStartMethod`
|
|
568
|
+
|
|
569
|
+
```graphql
|
|
570
|
+
"""
|
|
571
|
+
How the user finishes an email-first sign-in started by `sessionStart`.
|
|
572
|
+
"""
|
|
573
|
+
enum SessionStartMethod {
|
|
574
|
+
"""
|
|
575
|
+
The account has set a password: call `sessionCreate` with it. No email was sent.
|
|
576
|
+
"""
|
|
577
|
+
PASSWORD
|
|
578
|
+
"""
|
|
579
|
+
A sign-in email carrying a six-digit code and a link was sent to the address,
|
|
580
|
+
if it has an account. Finish with `magicLinkVerify`, or by following the link.
|
|
581
|
+
An address with no account also answers `EMAIL_CODE`, and is sent nothing.
|
|
582
|
+
"""
|
|
583
|
+
EMAIL_CODE
|
|
584
|
+
}
|
|
585
|
+
```
|
|
586
|
+
|
|
587
|
+
### `SessionStartInput`
|
|
588
|
+
|
|
589
|
+
```graphql
|
|
590
|
+
"""
|
|
591
|
+
Input for `sessionStart` — begin signing in with an email address alone.
|
|
592
|
+
"""
|
|
593
|
+
input SessionStartInput {
|
|
594
|
+
"""Email address of the user."""
|
|
595
|
+
email: String!
|
|
596
|
+
"""
|
|
597
|
+
URL the emailed sign-in link returns to (must match a registered redirect URL).
|
|
598
|
+
"""
|
|
599
|
+
redirectUrl: String
|
|
600
|
+
}
|
|
601
|
+
```
|
|
602
|
+
|
|
603
|
+
### `SessionStartPayload`
|
|
604
|
+
|
|
605
|
+
```graphql
|
|
606
|
+
"""
|
|
607
|
+
Payload returned by `sessionStart`.
|
|
608
|
+
|
|
609
|
+
`method` says which step completes the sign-in, and reveals whether a registered
|
|
610
|
+
address has set a password. An address without a password and an unknown address
|
|
611
|
+
both answer `EMAIL_CODE`, though the response time can differ because only a
|
|
612
|
+
registered address is sent an email.
|
|
613
|
+
"""
|
|
614
|
+
type SessionStartPayload {
|
|
615
|
+
"""How the user finishes signing in."""
|
|
616
|
+
method: SessionStartMethod!
|
|
617
|
+
}
|
|
618
|
+
```
|
|
619
|
+
|
|
620
|
+
### `SessionCreateInput`
|
|
621
|
+
|
|
622
|
+
```graphql
|
|
623
|
+
"""Input for `sessionCreate` — sign in with email and password."""
|
|
624
|
+
input SessionCreateInput {
|
|
625
|
+
"""Email address of the user."""
|
|
626
|
+
email: String!
|
|
627
|
+
"""Password for the user account."""
|
|
628
|
+
password: String!
|
|
629
|
+
}
|
|
630
|
+
```
|
|
631
|
+
|
|
632
|
+
### `SessionCreatePayload`
|
|
633
|
+
|
|
634
|
+
```graphql
|
|
635
|
+
"""
|
|
636
|
+
Payload returned by `sessionCreate`.
|
|
637
|
+
|
|
638
|
+
The session is always at `AAL1`. Read `session.user.mfa`: when `required`
|
|
639
|
+
or `enrolled` is true, complete sign-in with `mfaChallengeCreate` and
|
|
640
|
+
`mfaChallengeVerify` (or `mfaFactorEnroll` first when nothing is enrolled)
|
|
641
|
+
before calling guarded fields.
|
|
642
|
+
"""
|
|
643
|
+
type SessionCreatePayload {
|
|
644
|
+
"""The created session."""
|
|
645
|
+
session: Session
|
|
646
|
+
}
|
|
647
|
+
```
|
|
648
|
+
|
|
649
|
+
### `SessionRefreshInput`
|
|
650
|
+
|
|
651
|
+
```graphql
|
|
652
|
+
"""
|
|
653
|
+
Input for `sessionRefresh` — exchange a refresh token for a fresh session.
|
|
654
|
+
"""
|
|
655
|
+
input SessionRefreshInput {
|
|
656
|
+
"""Refresh token from the current session."""
|
|
657
|
+
refreshToken: String!
|
|
658
|
+
}
|
|
659
|
+
```
|
|
660
|
+
|
|
661
|
+
### `SessionRefreshPayload`
|
|
662
|
+
|
|
663
|
+
```graphql
|
|
664
|
+
"""Payload returned by `sessionRefresh`."""
|
|
665
|
+
type SessionRefreshPayload {
|
|
666
|
+
"""
|
|
667
|
+
The refreshed session, with a new `accessToken` and rotated `refreshToken`.
|
|
668
|
+
"""
|
|
669
|
+
session: Session
|
|
670
|
+
}
|
|
671
|
+
```
|
|
672
|
+
|
|
673
|
+
### `AccountCreateInput`
|
|
674
|
+
|
|
675
|
+
```graphql
|
|
676
|
+
"""
|
|
677
|
+
Input for `accountCreate` — register with an email address.
|
|
678
|
+
|
|
679
|
+
Registration collects no password. The API creates the account with a
|
|
680
|
+
password it generates and never returns, and the user chooses their own
|
|
681
|
+
password after confirming the address.
|
|
682
|
+
"""
|
|
683
|
+
input AccountCreateInput {
|
|
684
|
+
"""Email address for the new account."""
|
|
685
|
+
email: String!
|
|
686
|
+
"""
|
|
687
|
+
URL the confirmation link returns to. Must match a registered redirect URL;
|
|
688
|
+
Supabase falls back to the site URL when it does not.
|
|
689
|
+
"""
|
|
690
|
+
redirectUrl: String
|
|
691
|
+
"""Optional metadata to attach to the user's `userMetadata` blob."""
|
|
692
|
+
metadata: JSON
|
|
693
|
+
}
|
|
694
|
+
```
|
|
695
|
+
|
|
696
|
+
### `AccountCreatePayload`
|
|
697
|
+
|
|
698
|
+
```graphql
|
|
699
|
+
"""
|
|
700
|
+
Payload returned by `accountCreate`.
|
|
701
|
+
|
|
702
|
+
`success` is true for every address that was emailed, so the payload reveals
|
|
703
|
+
nothing about whether the address already has an account. A new or unconfirmed
|
|
704
|
+
address is emailed a confirmation code and link; an address that already
|
|
705
|
+
belongs to a confirmed account is emailed a magic-link sign-in instead. An
|
|
706
|
+
address emailed inside Supabase Auth's minimum send interval also returns
|
|
707
|
+
true — the previous email's code and link are still valid.
|
|
708
|
+
|
|
709
|
+
Registration completes when the user confirms the address and sets a password
|
|
710
|
+
through `passwordUpdate`.
|
|
711
|
+
"""
|
|
712
|
+
type AccountCreatePayload {
|
|
713
|
+
"""Whether an email was sent to the address."""
|
|
714
|
+
success: Boolean!
|
|
715
|
+
}
|
|
716
|
+
```
|
|
717
|
+
|
|
718
|
+
### `AccountVerifyEmailInput`
|
|
719
|
+
|
|
720
|
+
```graphql
|
|
721
|
+
"""
|
|
722
|
+
Input for `accountVerifyEmail` — exchange a verification token for a session.
|
|
723
|
+
"""
|
|
724
|
+
input AccountVerifyEmailInput {
|
|
725
|
+
"""Email address being verified."""
|
|
726
|
+
email: String!
|
|
727
|
+
"""Verification token from the confirmation email link."""
|
|
728
|
+
token: String!
|
|
729
|
+
}
|
|
730
|
+
```
|
|
731
|
+
|
|
732
|
+
### `AccountVerifyEmailPayload`
|
|
733
|
+
|
|
734
|
+
```graphql
|
|
735
|
+
"""Payload returned by `accountVerifyEmail`."""
|
|
736
|
+
type AccountVerifyEmailPayload {
|
|
737
|
+
"""Session for the verified user."""
|
|
738
|
+
session: Session
|
|
739
|
+
}
|
|
740
|
+
```
|
|
741
|
+
|
|
742
|
+
### `AccountResendVerificationInput`
|
|
743
|
+
|
|
744
|
+
```graphql
|
|
745
|
+
"""
|
|
746
|
+
Input for `accountResendVerification` — resend the verification email to the same address.
|
|
747
|
+
"""
|
|
748
|
+
input AccountResendVerificationInput {
|
|
749
|
+
"""Email address to resend verification to."""
|
|
750
|
+
email: String!
|
|
751
|
+
}
|
|
752
|
+
```
|
|
753
|
+
|
|
754
|
+
### `AccountResendVerificationPayload`
|
|
755
|
+
|
|
756
|
+
```graphql
|
|
757
|
+
"""Payload returned by `accountResendVerification`."""
|
|
758
|
+
type AccountResendVerificationPayload {
|
|
759
|
+
"""Whether the verification email was sent successfully."""
|
|
760
|
+
success: Boolean!
|
|
761
|
+
}
|
|
762
|
+
```
|
|
763
|
+
|
|
764
|
+
### `OAuthAuthorizeInput`
|
|
765
|
+
|
|
766
|
+
```graphql
|
|
767
|
+
"""
|
|
768
|
+
Input for `oauthAuthorize` — request the upstream provider's authorisation URL.
|
|
769
|
+
"""
|
|
770
|
+
input OAuthAuthorizeInput {
|
|
771
|
+
"""OAuth provider to authorise with."""
|
|
772
|
+
provider: OAuthProvider!
|
|
773
|
+
"""
|
|
774
|
+
URL the OAuth provider should redirect the user to after authentication.
|
|
775
|
+
The server resolves the tenant from this URL's hostname; unknown
|
|
776
|
+
hostnames fall back to the default tenant.
|
|
777
|
+
"""
|
|
778
|
+
redirectUrl: String!
|
|
779
|
+
"""
|
|
780
|
+
Optional scopes to request from the provider, in addition to the defaults.
|
|
781
|
+
"""
|
|
782
|
+
scopes: [String!]
|
|
783
|
+
}
|
|
784
|
+
```
|
|
785
|
+
|
|
786
|
+
### `OAuthAuthorizePayload`
|
|
787
|
+
|
|
788
|
+
```graphql
|
|
789
|
+
"""Payload returned by `oauthAuthorize`."""
|
|
790
|
+
type OAuthAuthorizePayload {
|
|
791
|
+
"""URL to redirect the user to for authorisation."""
|
|
792
|
+
url: String
|
|
793
|
+
}
|
|
794
|
+
```
|
|
795
|
+
|
|
796
|
+
### `OAuthCallbackInput`
|
|
797
|
+
|
|
798
|
+
```graphql
|
|
799
|
+
"""
|
|
800
|
+
Input for `oauthCallback` — exchange the provider's authorisation code for a session.
|
|
801
|
+
"""
|
|
802
|
+
input OAuthCallbackInput {
|
|
803
|
+
"""OAuth provider that initiated the callback."""
|
|
804
|
+
provider: OAuthProvider!
|
|
805
|
+
"""Authorisation code from the provider's redirect."""
|
|
806
|
+
code: String!
|
|
807
|
+
}
|
|
808
|
+
```
|
|
809
|
+
|
|
810
|
+
### `OAuthCallbackPayload`
|
|
811
|
+
|
|
812
|
+
```graphql
|
|
813
|
+
"""Payload returned by `oauthCallback`."""
|
|
814
|
+
type OAuthCallbackPayload {
|
|
815
|
+
"""Session for the authenticated user."""
|
|
816
|
+
session: Session
|
|
817
|
+
}
|
|
818
|
+
```
|
|
819
|
+
|
|
820
|
+
### `OAuthConsentClient`
|
|
821
|
+
|
|
822
|
+
```graphql
|
|
823
|
+
"""
|
|
824
|
+
OAuth client info returned with an in-flight consent authorisation request.
|
|
825
|
+
"""
|
|
826
|
+
type OAuthConsentClient {
|
|
827
|
+
"""Client ID assigned to the OAuth client."""
|
|
828
|
+
id: String!
|
|
829
|
+
"""Display name of the OAuth client."""
|
|
830
|
+
name: String!
|
|
831
|
+
"""Client URI (the application's homepage)."""
|
|
832
|
+
uri: String
|
|
833
|
+
"""Logo image URL — shown on the consent prompt."""
|
|
834
|
+
logoUri: String
|
|
835
|
+
}
|
|
836
|
+
```
|
|
837
|
+
|
|
838
|
+
### `OAuthConsentDetails`
|
|
839
|
+
|
|
840
|
+
```graphql
|
|
841
|
+
"""
|
|
842
|
+
Details of an in-flight OAuth consent authorisation request. Returned by
|
|
843
|
+
`oauthConsentDetails` when the dashboard renders the consent prompt; the
|
|
844
|
+
client uses `oauthConsentApprove` or `oauthConsentDeny` to resolve it.
|
|
845
|
+
"""
|
|
846
|
+
type OAuthConsentDetails {
|
|
847
|
+
"""
|
|
848
|
+
Authorisation ID — supply this to `oauthConsentApprove` / `oauthConsentDeny`.
|
|
849
|
+
"""
|
|
850
|
+
authorizationId: String!
|
|
851
|
+
"""The requesting client (the OAuth app the user is granting access to)."""
|
|
852
|
+
client: OAuthConsentClient!
|
|
853
|
+
"""Signed-in user's email — shown for confirmation on the consent prompt."""
|
|
854
|
+
userEmail: String!
|
|
855
|
+
"""Space-separated scopes the client is requesting."""
|
|
856
|
+
scope: String!
|
|
857
|
+
"""Always `null`. Read `OAuthConsentDetailsPayload.redirectUrl` instead"""
|
|
858
|
+
redirectUrl: String @deprecated(reason: "Use OAuthConsentDetailsPayload.redirectUrl.")
|
|
859
|
+
}
|
|
860
|
+
```
|
|
861
|
+
|
|
862
|
+
### `OAuthConsentDetailsInput`
|
|
863
|
+
|
|
864
|
+
```graphql
|
|
865
|
+
"""Input for `oauthConsentDetails`."""
|
|
866
|
+
input OAuthConsentDetailsInput {
|
|
867
|
+
"""The `authorization_id` query parameter from the consent URL."""
|
|
868
|
+
authorizationId: String!
|
|
869
|
+
}
|
|
870
|
+
```
|
|
871
|
+
|
|
872
|
+
### `OAuthConsentDetailsPayload`
|
|
873
|
+
|
|
874
|
+
```graphql
|
|
875
|
+
"""
|
|
876
|
+
Payload returned by `oauthConsentDetails`. Exactly one of the two fields is set.
|
|
877
|
+
|
|
878
|
+
`details` is set when the user has not yet consented to this client: render the
|
|
879
|
+
consent prompt, then call `oauthConsentApprove` or `oauthConsentDeny`.
|
|
880
|
+
|
|
881
|
+
`redirectUrl` is set when the user has already consented to this client for
|
|
882
|
+
these scopes. Reading the authorisation approves it — the authorisation code is
|
|
883
|
+
already minted and the prompt must be skipped. Send the user to this URL.
|
|
884
|
+
"""
|
|
885
|
+
type OAuthConsentDetailsPayload {
|
|
886
|
+
"""
|
|
887
|
+
Authorisation details — the requesting client and requested scopes. Null when `redirectUrl` is set.
|
|
888
|
+
"""
|
|
889
|
+
details: OAuthConsentDetails
|
|
890
|
+
"""
|
|
891
|
+
Where to send the user when consent was already granted. Null when `details` is set.
|
|
892
|
+
"""
|
|
893
|
+
redirectUrl: String
|
|
894
|
+
}
|
|
895
|
+
```
|
|
896
|
+
|
|
897
|
+
### `OAuthConsentApproveInput`
|
|
898
|
+
|
|
899
|
+
```graphql
|
|
900
|
+
"""Input for `oauthConsentApprove`."""
|
|
901
|
+
input OAuthConsentApproveInput {
|
|
902
|
+
"""The `authorization_id` to approve."""
|
|
903
|
+
authorizationId: String!
|
|
904
|
+
}
|
|
905
|
+
```
|
|
906
|
+
|
|
907
|
+
### `OAuthConsentDenyInput`
|
|
908
|
+
|
|
909
|
+
```graphql
|
|
910
|
+
"""Input for `oauthConsentDeny`."""
|
|
911
|
+
input OAuthConsentDenyInput {
|
|
912
|
+
"""The `authorization_id` to deny."""
|
|
913
|
+
authorizationId: String!
|
|
914
|
+
}
|
|
915
|
+
```
|
|
916
|
+
|
|
917
|
+
### `OAuthConsentActionPayload`
|
|
918
|
+
|
|
919
|
+
```graphql
|
|
920
|
+
"""Payload returned by `oauthConsentApprove` and `oauthConsentDeny`."""
|
|
921
|
+
type OAuthConsentActionPayload {
|
|
922
|
+
"""URL to redirect the user to after the consent decision."""
|
|
923
|
+
redirectUrl: String!
|
|
924
|
+
}
|
|
925
|
+
```
|
|
926
|
+
|
|
927
|
+
### `MagicLinkSendInput`
|
|
928
|
+
|
|
929
|
+
```graphql
|
|
930
|
+
"""
|
|
931
|
+
Input for `magicLinkSend` — send a one-time sign-in link to the given email.
|
|
932
|
+
"""
|
|
933
|
+
input MagicLinkSendInput {
|
|
934
|
+
"""Email address to send the magic link to."""
|
|
935
|
+
email: String!
|
|
936
|
+
"""
|
|
937
|
+
URL to redirect to after verification (must match a registered redirect URL).
|
|
938
|
+
"""
|
|
939
|
+
redirectUrl: String
|
|
940
|
+
}
|
|
941
|
+
```
|
|
942
|
+
|
|
943
|
+
### `MagicLinkSendPayload`
|
|
944
|
+
|
|
945
|
+
```graphql
|
|
946
|
+
"""Payload returned by `magicLinkSend`."""
|
|
947
|
+
type MagicLinkSendPayload {
|
|
948
|
+
"""Whether the magic link was sent successfully."""
|
|
949
|
+
success: Boolean!
|
|
950
|
+
}
|
|
951
|
+
```
|
|
952
|
+
|
|
953
|
+
### `MagicLinkVerifyInput`
|
|
954
|
+
|
|
955
|
+
```graphql
|
|
956
|
+
"""
|
|
957
|
+
Input for `magicLinkVerify` — exchange the magic-link token for a session.
|
|
958
|
+
"""
|
|
959
|
+
input MagicLinkVerifyInput {
|
|
960
|
+
"""Email address the magic link was sent to."""
|
|
961
|
+
email: String!
|
|
962
|
+
"""Six-digit code from the email."""
|
|
963
|
+
token: String!
|
|
964
|
+
}
|
|
965
|
+
```
|
|
966
|
+
|
|
967
|
+
### `MagicLinkVerifyPayload`
|
|
968
|
+
|
|
969
|
+
```graphql
|
|
970
|
+
"""Payload returned by `magicLinkVerify`."""
|
|
971
|
+
type MagicLinkVerifyPayload {
|
|
972
|
+
"""Session for the authenticated user."""
|
|
973
|
+
session: Session
|
|
974
|
+
}
|
|
975
|
+
```
|
|
976
|
+
|
|
977
|
+
### `EmailLinkType`
|
|
978
|
+
|
|
979
|
+
```graphql
|
|
980
|
+
"""
|
|
981
|
+
The emails whose link signs the recipient in through `emailLinkVerify`.
|
|
982
|
+
"""
|
|
983
|
+
enum EmailLinkType {
|
|
984
|
+
"""A password-reset email."""
|
|
985
|
+
RECOVERY
|
|
986
|
+
"""An invitation to an organisation, sent to an address with no account."""
|
|
987
|
+
INVITE
|
|
988
|
+
"""A sign-in email to a confirmed account."""
|
|
989
|
+
MAGIC_LINK
|
|
990
|
+
"""A confirmation email for a new registration."""
|
|
991
|
+
SIGNUP
|
|
992
|
+
}
|
|
993
|
+
```
|
|
994
|
+
|
|
995
|
+
### `EmailLinkVerifyInput`
|
|
996
|
+
|
|
997
|
+
```graphql
|
|
998
|
+
"""
|
|
999
|
+
Input for `emailLinkVerify` — exchange the token hash from an emailed link for a session.
|
|
1000
|
+
"""
|
|
1001
|
+
input EmailLinkVerifyInput {
|
|
1002
|
+
"""The `token_hash` carried by the emailed link."""
|
|
1003
|
+
tokenHash: String!
|
|
1004
|
+
"""Which email the link came from."""
|
|
1005
|
+
type: EmailLinkType!
|
|
1006
|
+
}
|
|
1007
|
+
```
|
|
1008
|
+
|
|
1009
|
+
### `EmailLinkVerifyPayload`
|
|
1010
|
+
|
|
1011
|
+
```graphql
|
|
1012
|
+
"""Payload returned by `emailLinkVerify`."""
|
|
1013
|
+
type EmailLinkVerifyPayload {
|
|
1014
|
+
"""Session for the authenticated user."""
|
|
1015
|
+
session: Session
|
|
1016
|
+
}
|
|
1017
|
+
```
|
|
1018
|
+
|
|
1019
|
+
### `PasswordResetSendInput`
|
|
1020
|
+
|
|
1021
|
+
```graphql
|
|
1022
|
+
"""
|
|
1023
|
+
Input for `passwordResetSend` — send a password-reset email to the given address.
|
|
1024
|
+
"""
|
|
1025
|
+
input PasswordResetSendInput {
|
|
1026
|
+
"""Email address to send the password-reset email to."""
|
|
1027
|
+
email: String!
|
|
1028
|
+
"""URL to redirect the user to for the password-reset form."""
|
|
1029
|
+
redirectUrl: String
|
|
1030
|
+
}
|
|
1031
|
+
```
|
|
1032
|
+
|
|
1033
|
+
### `PasswordResetSendPayload`
|
|
1034
|
+
|
|
1035
|
+
```graphql
|
|
1036
|
+
"""Payload returned by `passwordResetSend`."""
|
|
1037
|
+
type PasswordResetSendPayload {
|
|
1038
|
+
"""Whether the password-reset email was sent successfully."""
|
|
1039
|
+
success: Boolean!
|
|
1040
|
+
}
|
|
1041
|
+
```
|
|
1042
|
+
|
|
1043
|
+
### `PasswordUpdateInput`
|
|
1044
|
+
|
|
1045
|
+
```graphql
|
|
1046
|
+
"""
|
|
1047
|
+
Input for `passwordUpdate` — change the authenticated user's password.
|
|
1048
|
+
The current password is not required; the operation is gated by an
|
|
1049
|
+
authenticated session instead.
|
|
1050
|
+
|
|
1051
|
+
Updating the password ends every other active session for this user. The
|
|
1052
|
+
caller's own session stays valid at the assurance level it holds.
|
|
1053
|
+
"""
|
|
1054
|
+
input PasswordUpdateInput {
|
|
1055
|
+
"""New password to set. Must meet Supabase Auth strength requirements."""
|
|
1056
|
+
newPassword: String!
|
|
1057
|
+
}
|
|
1058
|
+
```
|
|
1059
|
+
|
|
1060
|
+
### `PasswordUpdatePayload`
|
|
1061
|
+
|
|
1062
|
+
```graphql
|
|
1063
|
+
"""Payload returned by `passwordUpdate`."""
|
|
1064
|
+
type PasswordUpdatePayload {
|
|
1065
|
+
"""Whether the password was updated successfully."""
|
|
1066
|
+
success: Boolean!
|
|
1067
|
+
"""Null: the caller's own session stays valid through the change."""
|
|
1068
|
+
session: Session
|
|
1069
|
+
}
|
|
1070
|
+
```
|
|
1071
|
+
|
|
1072
|
+
### `MfaFactorEnrollInput`
|
|
1073
|
+
|
|
1074
|
+
```graphql
|
|
1075
|
+
"""
|
|
1076
|
+
Input for `mfaFactorEnroll` — enrol an authenticator app. The caller's
|
|
1077
|
+
unverified TOTP factors are deleted first, except the two newest enrolled in the
|
|
1078
|
+
last minute, which setups open elsewhere may still be showing. An unverified
|
|
1079
|
+
factor that holds the `friendlyName` given is deleted however new it is.
|
|
1080
|
+
"""
|
|
1081
|
+
input MfaFactorEnrollInput {
|
|
1082
|
+
"""
|
|
1083
|
+
Name for the factor, shown on the account page. Defaults to "Authenticator app",
|
|
1084
|
+
numbered ("Authenticator app 2", …) past the names the caller's factors hold.
|
|
1085
|
+
"""
|
|
1086
|
+
friendlyName: String
|
|
1087
|
+
}
|
|
1088
|
+
```
|
|
1089
|
+
|
|
1090
|
+
### `MfaFactorEnrollPayload`
|
|
1091
|
+
|
|
1092
|
+
```graphql
|
|
1093
|
+
"""Payload returned by `mfaFactorEnroll`."""
|
|
1094
|
+
type MfaFactorEnrollPayload {
|
|
1095
|
+
"""The newly enrolled MFA factor (status starts as `UNVERIFIED`)."""
|
|
1096
|
+
factor: MfaFactor!
|
|
1097
|
+
"""What the authenticator app needs to add the factor. Shown once."""
|
|
1098
|
+
totp: MfaTotpEnrollment!
|
|
1099
|
+
}
|
|
1100
|
+
```
|
|
1101
|
+
|
|
1102
|
+
### `MfaChallengeCreateInput`
|
|
1103
|
+
|
|
1104
|
+
```graphql
|
|
1105
|
+
"""
|
|
1106
|
+
Input for `mfaChallengeCreate` — open a challenge against an enrolled factor.
|
|
1107
|
+
"""
|
|
1108
|
+
input MfaChallengeCreateInput {
|
|
1109
|
+
"""ID of the MFA factor to challenge."""
|
|
1110
|
+
factorId: ID!
|
|
1111
|
+
}
|
|
1112
|
+
```
|
|
1113
|
+
|
|
1114
|
+
### `MfaChallengeCreatePayload`
|
|
1115
|
+
|
|
1116
|
+
```graphql
|
|
1117
|
+
"""Payload returned by `mfaChallengeCreate`."""
|
|
1118
|
+
type MfaChallengeCreatePayload {
|
|
1119
|
+
"""ID of the created challenge — supply to `mfaChallengeVerify`."""
|
|
1120
|
+
challengeId: ID!
|
|
1121
|
+
"""When the challenge stops accepting codes."""
|
|
1122
|
+
expiresAt: DateTime!
|
|
1123
|
+
}
|
|
1124
|
+
```
|
|
1125
|
+
|
|
1126
|
+
### `MfaChallengeVerifyInput`
|
|
1127
|
+
|
|
1128
|
+
```graphql
|
|
1129
|
+
"""
|
|
1130
|
+
Input for `mfaChallengeVerify` — submit the current code from the authenticator app.
|
|
1131
|
+
"""
|
|
1132
|
+
input MfaChallengeVerifyInput {
|
|
1133
|
+
"""ID of the MFA factor."""
|
|
1134
|
+
factorId: ID!
|
|
1135
|
+
"""ID of the challenge to verify."""
|
|
1136
|
+
challengeId: ID!
|
|
1137
|
+
"""Six-digit code from the authenticator app."""
|
|
1138
|
+
code: String!
|
|
1139
|
+
}
|
|
1140
|
+
```
|
|
1141
|
+
|
|
1142
|
+
### `MfaChallengeVerifyPayload`
|
|
1143
|
+
|
|
1144
|
+
```graphql
|
|
1145
|
+
"""
|
|
1146
|
+
Payload returned by `mfaChallengeVerify`. The returned session carries rotated
|
|
1147
|
+
tokens at `AAL2`; the user's other sessions are left alone.
|
|
1148
|
+
"""
|
|
1149
|
+
type MfaChallengeVerifyPayload {
|
|
1150
|
+
"""Session upgraded to AAL2, with new `accessToken` and `refreshToken`."""
|
|
1151
|
+
session: Session
|
|
1152
|
+
}
|
|
1153
|
+
```
|
|
1154
|
+
|
|
1155
|
+
### `MfaFactorUnenrollInput`
|
|
1156
|
+
|
|
1157
|
+
```graphql
|
|
1158
|
+
"""
|
|
1159
|
+
Input for `mfaFactorUnenroll` — remove an enrolled MFA factor. Removing a
|
|
1160
|
+
`VERIFIED` factor needs an `AAL2` session; an `AAL1` session is refused with
|
|
1161
|
+
`MFA_REQUIRED`.
|
|
1162
|
+
"""
|
|
1163
|
+
input MfaFactorUnenrollInput {
|
|
1164
|
+
"""ID of the MFA factor to unenrol."""
|
|
1165
|
+
factorId: ID!
|
|
1166
|
+
}
|
|
1167
|
+
```
|
|
1168
|
+
|
|
1169
|
+
### `MfaFactorUnenrollPayload`
|
|
1170
|
+
|
|
1171
|
+
```graphql
|
|
1172
|
+
"""Payload returned by `mfaFactorUnenroll`."""
|
|
1173
|
+
type MfaFactorUnenrollPayload {
|
|
1174
|
+
"""Whether the factor was unenrolled successfully."""
|
|
1175
|
+
success: Boolean!
|
|
1176
|
+
}
|
|
1177
|
+
```
|