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: doc/developer/supabase-configuration.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,10 @@ make supabase-remote-init
12
12
13
13
The script will ask you for the Supabase instance name, create the database, apply the migrations and deploy the edge functions. Finally, it will create a `.env.production.local` file with your remote Supabase configuration.
14
14
15
+
### Setting Up An Email Provider
16
+
17
+
The script cannot yet automate the configuration of the required SMTP provider on your Supabase instance. To do that, please follow the instructions detailed in the [Email Provider Setup](#email-provider-setup) section.
18
+
15
19
## Alternative: Using An Existing Supabase Instance
16
20
17
21
If you already created a project on [supabase.com](https://supabase.com/), you can configure the Atomic CRM frontend to use it.
Atomic CRM requires that you set up an email provider on your Supabase instance. If you don't have one yet, please follow the instructions detailed in the [Email Provider Setup](#email-provider-setup) section.
52
+
45
53
## Testing Production Mode
46
54
47
55
Before deploying the frontend code to production, you may want to test the local frontend code when connected to the remote Supabase instance.
@@ -54,6 +62,32 @@ make prod-start
54
62
55
63
Using a remote Supabase instance can be interesting if you deploy from your computer, or if you want to test your app with production data in production mode.
56
64
65
+
## Email Provider Setup
66
+
67
+
In order to support [the invitations workflow](../user/user-management.md#adding-users) and the default email/password authentication (including password reset), Atomic CRM needs to be able to send emails from your Supabase instance.
68
+
69
+
By default, Supabase provides a simple SMTP server for all projects. But this server imposes a few important restrictions and is not meant for production use:
70
+
- It can only send messages to pre-authorized addresses
71
+
- It imposes significant rate-limits
72
+
- There is no SLA guarantee on message delivery or uptime
73
+
74
+
For this reason, it is recommended to use a [custom SMTP provider](https://supabase.com/docs/guides/auth/auth-smtp#how-to-set-up-a-custom-smtp-server).
75
+
76
+
A non-exhaustive list of services that work with Supabase Auth is:
77
+
78
+
-[Postmark](https://postmarkapp.com/developer/user-guide/send-email-with-smtp) (recommended if you also plan to use the [Inbound Email](../user/inbound-email.md) feature)
Once you've set up your account with an email sending service, head to the [Authentication settings page](https://supabase.com/dashboard/project/_/settings/auth) to enable and configure custom SMTP.
86
+
87
+
Once you save these settings, your project's Auth server will send messages to all addresses. To protect the reputation of your newly set up service a low rate-limit of 30 messages per hour is imposed. To adjust this to an acceptable value for your use case head to the [Rate Limits configuration page](https://supabase.com/dashboard/project/_/auth/rate-limits).
88
+
89
+
**Note:** Alternatively, you can also [set up an authentication hook](https://supabase.com/docs/guides/auth/auth-hooks/send-email-hook) to send the emails yourself.
90
+
57
91
## Setting The Login Callback
58
92
59
93
Atomic CRM uses Supabase's authentication system. When a user logs in, Supabase redirects them to an authentication callback URL that is handled by the frontend.
0 commit comments