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
ECC/Ed25519 optional). HS256 is still supported for compatibility, but
150
+
migrating to asymmetric keys is recommended for easier validation and
151
+
rotation. Future deprecations will be announced in the changelog. See the
152
+
[JWT Signing Keys](https://supabase.com/docs/guides/auth/signing-keys) and
153
+
[JWTs guide](https://supabase.com/docs/guides/auth/jwts) for details.
151
154
152
155
Note that this is not an exhaustive list and it may change.
153
156
@@ -158,7 +161,7 @@ compatibility with Auth:
158
161
159
162
1. Do not modify the schema managed by Auth. You can see all of the
160
163
migrations in the `migrations` directory.
161
-
2. Do not rely on schema and structure of data in the database. Always use
164
+
2. Do not rely on the schema and the structure of data in the database. Always use
162
165
Auth APIs and JWTs to infer information about users.
163
166
3. Always run Auth behind a TLS-capable proxy such as a load balancer, CDN,
164
167
nginx or other similar software.
@@ -180,7 +183,7 @@ The base URL your site is located at. Currently used in combination with other s
180
183
181
184
`URI_ALLOW_LIST` - `string`
182
185
183
-
A commaseparated list of URIs (e.g. `"https://foo.example.com,https://*.foo.example.com,https://bar.example.com"`) which are permitted as valid `redirect_to` destinations. Defaults to []. Supports wildcard matching through globbing. e.g. `https://*.foo.example.com` will allow `https://a.foo.example.com` and `https://b.foo.example.com` to be accepted. Globbing is also supported on subdomains. e.g. `https://foo.example.com/*` will allow `https://foo.example.com/page1` and `https://foo.example.com/page2` to be accepted.
186
+
A comma-separated list of URIs (e.g. `"https://foo.example.com,https://*.foo.example.com,https://bar.example.com"`) which are permitted as valid `redirect_to` destinations. Defaults to []. Supports wildcard matching through globbing. e.g. `https://*.foo.example.com` will allow `https://a.foo.example.com` and `https://b.foo.example.com` to be accepted. Globbing is also supported on subdomains. e.g. `https://foo.example.com/*` will allow `https://foo.example.com/page1` and `https://foo.example.com/page2` to be accepted.
184
187
185
188
For more common glob patterns, check out the [following link](https://pkg.go.dev/github.com/gobwas/glob#Compile).
186
189
@@ -195,19 +198,19 @@ When signup is disabled the only way to create new users is through invites. Def
195
198
196
199
`GOTRUE_EXTERNAL_EMAIL_ENABLED` - `bool`
197
200
198
-
Use this to disable email signups (users can still use external oauth providers to sign up / sign in)
201
+
Use this to disable email signups (users can still use external OAuth providers to sign up / sign in)
199
202
200
203
`GOTRUE_EXTERNAL_PHONE_ENABLED` - `bool`
201
204
202
-
Use this to disable phone signups (users can still use external oauth providers to sign up / sign in)
205
+
Use this to disable phone signups (users can still use external OAuth providers to sign up / sign in)
203
206
204
207
`GOTRUE_RATE_LIMIT_HEADER` - `string`
205
208
206
209
Header on which to rate limit the `/token` endpoint.
207
210
208
211
`GOTRUE_RATE_LIMIT_EMAIL_SENT` - `string`
209
212
210
-
Rate limit the number of emails sent per hr on the following endpoints: `/signup`, `/invite`, `/magiclink`, `/recover`, `/otp`, & `/user`.
213
+
Rate limit the number of emails sent per hour on the following endpoints: `/signup`, `/invite`, `/magiclink`, `/recover`, `/otp`, & `/user`.
211
214
212
215
`GOTRUE_PASSWORD_MIN_LENGTH` - `int`
213
216
@@ -217,7 +220,7 @@ Minimum password length, defaults to 6.
If refresh token rotation is enabled, auth will automatically detect malicious attempts to reuse a revoked refresh token. When a malicious attempt is detected, gotrue immediately revokes all tokens that descended from the offending token.
223
+
If refresh token rotation is enabled, auth will automatically detect malicious attempts to reuse a revoked refresh token. When a malicious attempt is detected, GoTrue immediately revokes all tokens that descended from the offending token.
@@ -247,7 +250,7 @@ Controls what endpoint Netlify can access this API on.
247
250
248
251
`API_EXTERNAL_URL` - `string`**required**
249
252
250
-
The URL on which Gotrue might be accessed at.
253
+
The URL on which GoTrue might be accessed at.
251
254
252
255
`REQUEST_ID_HEADER` - `string`
253
256
@@ -307,7 +310,7 @@ Auth has basic observability built in. It is able to export
307
310
308
311
To enable tracing configure these variables:
309
312
310
-
`GOTRUE_TRACING_ENABLED` - `boolean`
313
+
`GOTRUE_TRACING_ENABLED` - `bool`
311
314
312
315
`GOTRUE_TRACING_EXPORTER` - `string` only `opentelemetry` supported
313
316
@@ -498,7 +501,7 @@ To try out external authentication with Apple locally, you will need to do the f
498
501
3. Generate the crt and key file. See [here](https://www.freecodecamp.org/news/how-to-get-https-working-on-your-local-development-environment-in-5-minutes-7af615770eec/) for more information.
499
502
4. Generate the `GOTRUE_EXTERNAL_APPLE_SECRET` by following this [post](https://medium.com/identity-beyond-borders/how-to-configure-sign-in-with-apple-77c61e336003)!
500
503
501
-
### E-Mail
504
+
### Email
502
505
503
506
Sending email is not required, but highly recommended for password recovery.
504
507
If enabled, you must provide the required values below.
@@ -546,7 +549,7 @@ If you do not require email confirmation, you may set this to `true`. Defaults t
546
549
547
550
`MAILER_OTP_EXP` - `number`
548
551
549
-
Controls the duration an email link or otp is valid for.
552
+
Controls the duration an email link or OTP is valid for.
550
553
551
554
`MAILER_URLPATHS_INVITE` - `string`
552
555
@@ -740,6 +743,47 @@ Default Content (if template is unavailable):
740
743
741
744
Whether to send a notification email when a user's phone number is changed. Defaults to `false`.
URL path to an email template to use when notifying a user that a new identity has been linked to their account. (e.g. `https://www.example.com/path-to-email-template.html`)
749
+
`Email` and `Provider` variables are available.
750
+
751
+
Default Content (if template is unavailable):
752
+
753
+
```html
754
+
<h2>A new identity has been linked</h2>
755
+
756
+
<p>
757
+
A new identity ({{ .Provider }}) has been linked to your account {{ .Email }}.
758
+
</p>
759
+
<p>If you did not make this change, please contact support immediately.</p>
URL path to an email template to use when notifying a user that an identity has been unlinked from their account. (e.g. `https://www.example.com/path-to-email-template.html`)
769
+
`Email` and `Provider` variables are available.
770
+
771
+
Default Content (if template is unavailable):
772
+
773
+
```html
774
+
<h2>An identity has been unlinked</h2>
775
+
776
+
<p>
777
+
An identity ({{ .Provider }}) has been unlinked from your account {{ .Email
778
+
}}.
779
+
</p>
780
+
<p>If you did not make this change, please contact support immediately.</p>
URL path to an email template to use when notifying a user that they have enrolled in a new MFA factor. (e.g. `https://www.example.com/path-to-email-template.html`)
@@ -790,15 +834,15 @@ If you do not require phone confirmation, you may set this to `true`. Defaults t
790
834
791
835
`SMS_MAX_FREQUENCY` - `number`
792
836
793
-
Controls the minimum amount of time that must pass before sending another sms otp. The value is the number of seconds. Defaults to 60 (1 minute)).
837
+
Controls the minimum amount of time that must pass before sending another SMS OTP. The value is the number of seconds. Defaults to 60 (1 minute).
794
838
795
839
`SMS_OTP_EXP` - `number`
796
840
797
-
Controls the duration an sms otp is valid for.
841
+
Controls the duration an SMS OTP is valid for.
798
842
799
843
`SMS_OTP_LENGTH` - `number`
800
844
801
-
Controls the number of digits of the sms otp sent.
845
+
Controls the number of digits of the SMS OTP sent.
802
846
803
847
`SMS_PROVIDER` - `string`
804
848
@@ -825,7 +869,7 @@ Whether captcha middleware is enabled
825
869
826
870
`SECURITY_CAPTCHA_PROVIDER` - `string`
827
871
828
-
for now the only options supported are: `hcaptcha` and `turnstile`
872
+
for now the only options supported are: hCaptcha and Turnstile
829
873
830
874
-`SECURITY_CAPTCHA_SECRET` - `string`
831
875
-`SECURITY_CAPTCHA_TIMEOUT` - `string`
@@ -1080,7 +1124,7 @@ Returns:
1080
1124
}
1081
1125
```
1082
1126
1083
-
Verify a phone signup or sms otp. Type should be set to `sms`.
1127
+
Verify a phone signup or SMS OTP. Type should be set to `sms`.
1084
1128
1085
1129
```json
1086
1130
{
@@ -1130,7 +1174,7 @@ or show an account confirmed/welcome message in the case of `signup`, or direct
1130
1174
1131
1175
### **POST /otp**
1132
1176
1133
-
One-Time-Password. Will deliver a magiclink or sms otp to the user depending on whether the request body contains an "email" or "phone" key.
1177
+
One-Time-Password. Will deliver a magic link or SMS OTP to the user depending on whether the request body contains an "email" or "phone" key.
1134
1178
1135
1179
If `"create_user": true`, user will not be automatically signed up if the user doesn't exist.
1136
1180
@@ -1176,7 +1220,7 @@ Returns:
1176
1220
{}
1177
1221
```
1178
1222
1179
-
when clicked the magic link will redirect the user to `<SITE_URL>#access_token=x&refresh_token=y&expires_in=z&token_type=bearer&type=magiclink` (see `/verify` above)
1223
+
When the magic link is clicked, it will redirect to `<SITE_URL>#access_token=x&refresh_token=y&expires_in=z&token_type=bearer&type=magiclink` (see `/verify` above)
1180
1224
1181
1225
### **POST /recover**
1182
1226
@@ -1273,7 +1317,7 @@ Returns:
1273
1317
### **PUT /user**
1274
1318
1275
1319
Update a user (Requires authentication). Apart from changing email/password, this
1276
-
method can be used to set custom user data. Changing the email will result in a magiclink being sent out.
1320
+
method can be used to set custom user data. Changing the email will result in a magic link being sent out.
1277
1321
1278
1322
```json
1279
1323
{
@@ -1326,7 +1370,7 @@ headers: {
1326
1370
Logout a user (Requires authentication).
1327
1371
1328
1372
This will revoke all refresh tokens for the user. Remember that the JWT tokens
1329
-
will still be valid for stateless auth until they expires.
1373
+
will still be valid for stateless auth until they expire.
1330
1374
1331
1375
### **GET /authorize**
1332
1376
@@ -1342,11 +1386,11 @@ scopes=<optional additional scopes depending on the provider (email and name are
1342
1386
1343
1387
Redirects to provider and then to `/callback`
1344
1388
1345
-
For apple specific setup see: <https://github.com/supabase/auth#apple-oauth>
1389
+
For Apple-specific setup see: <https://github.com/supabase/auth#apple-oauth>
1346
1390
1347
1391
### **GET /callback**
1348
1392
1349
-
External provider should redirect to here
1393
+
External provider should redirect to this endpoint
1350
1394
1351
1395
Redirects to `<GOTRUE_SITE_URL>#access_token=<access_token>&refresh_token=<refresh_token>&provider_token=<provider_oauth_token>&expires_in=3600&provider=<provider_name>`
1352
1396
If additional scopes were requested then `provider_token` will be populated, you can use this to fetch additional data from the provider or interact with their services
0 commit comments