Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Adds a magic link example to the docs

Paul Copplestonef5276c663f74
diff --git a/web/docs/client/auth-signin.mdx b/web/docs/client/auth-signin.mdx
index ec8564db4a6..dacebb73962 100644
--- a/web/docs/client/auth-signin.mdx
+++ b/web/docs/client/auth-signin.mdx
@@ -148,7 +148,7 @@ The user's email address.
## Examples
-### Sign in
+### Sign in with email.
@@ -179,9 +179,39 @@ const { user, error } = await supabase.auth.signIn({
</Tabs>
-### Sign in using third-party providers.
+### Sign in with magic link.
+
+If no password is provided, the user will be sent a "magic link" to their email address, which they can click to open your application with a valid session.
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { user, error } = await supabase.auth.signIn({
+})
+```
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### Sign in using third-party providers.
+
+Supabase supports OAuth logins.
<Tabs
defaultValue="js"
diff --git a/web/docs/client/auth-signout.mdx b/web/docs/client/auth-signout.mdx
index 9751567452f..ad157d34784 100644
--- a/web/docs/client/auth-signout.mdx
+++ b/web/docs/client/auth-signout.mdx
@@ -77,4 +77,4 @@ const { error } = supabase.auth.signOut()
</TabItem>
-</Tabs>
+</Tabs>
\ No newline at end of file
diff --git a/web/spec/supabase.yml b/web/spec/supabase.yml
index 3c7fb439c00..91524dfc194 100644
--- a/web/spec/supabase.yml
+++ b/web/spec/supabase.yml
@@ -241,7 +241,7 @@ pages:
- If you provide `email` without a `password`, the user will be sent a magic link.
- Specifying a `provider` will open the browser to the relevant login page.
examples:
- - name: Sign in
+ - name: Sign in with email.
isSpotlight: true
js: |
```js
@@ -254,7 +254,20 @@ pages:
```py
# Not yet implemented
```
+ - name: Sign in with magic link.
+ description: If no password is provided, the user will be sent a "magic link" to their email address, which they can click to open your application with a valid session.
+ js: |
+ ```js
+ const { user, error } = await supabase.auth.signIn({
+ })
+ ```
+ py: |
+ ```py
+ # Not yet implemented
+ ```
- name: Sign in using third-party providers.
+ description: Supabase supports OAuth logins.
js: |
```js
const { user, error } = await supabase.auth.signIn({
@@ -274,7 +287,7 @@ pages:
isSpotlight: true
js: |
```js
- const { error } = supabase.signOut()
+ const { error } = supabase.auth.signOut()
```
py: |
```py