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/index.rst
+23-7Lines changed: 23 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -267,22 +267,38 @@ If you are having trouble receiving webhooks, you might need to look for any res
267
267
Configuring SMTP
268
268
================
269
269
270
-
For email-based factors, you can configure SMTP to allow the extension to send
271
-
emails on your behalf. You should either configure SMTP, or webhooks for the
272
-
relevant events.
273
270
274
-
Here is an example of configuring SMTP for local development, using something
275
-
like `Mailpit <https://mailpit.axllent.org/docs/>`__.
271
+
For email-based factors, you can configure SMTP to allow the extension to send emails on your behalf. You should either configure SMTP, or webhooks for the relevant events.
272
+
273
+
The easiest way to configure SMTP is to use the built-in UI. Here is an example of configuring SMTP for local development using EdgeQL directly, using something like `Mailpit <https://mailpit.axllent.org/docs/>`__.
274
+
275
+
.. note:: Gel Cloud users, rejoice!
276
+
277
+
If you are using Gel Cloud, you can use the built-in development SMTP provider without any configuration. This special provider is already configured for development usage and is ready to send emails while you are developing your application. This provider is tuned specifically for development: it is rate limited and the sender is hardcoded. Do not use it in production, it will not work for that purpose.
276
278
277
279
.. code-block:: edgeql
278
280
279
-
CONFIGURE CURRENT BRANCH INSERT cfg::SMTPProviderConfig {
281
+
# Create a new SMTP provider:
282
+
#
283
+
configure current branch
284
+
insert cfg::SMTPProviderConfig {
285
+
# This name must be unique and is used to reference the provider
286
+
name := 'local_mailpit',
280
287
sender := 'hello@example.com',
281
288
host := 'localhost',
282
289
port := <int32>1025,
290
+
username := 'smtpuser',
291
+
password := 'smtppassword',
283
292
security := 'STARTTLSOrPlainText',
284
293
validate_certs := false,
285
-
};
294
+
timeout_per_email := <duration>'60 seconds',
295
+
timeout_per_attempt := <duration>'15 seconds',
296
+
};
297
+
298
+
# Set this provider as the current email provider by name:
299
+
#
300
+
configure current branch
301
+
set current_email_provider_name := 'local_mailpit';
0 commit comments