Skip to content

Commit f9884bf

Browse files
authored
Merge pull request #12 from pdnode-team/XxdMkbMark-patch-1
Create register.md
2 parents e967ab2 + eee668b commit f9884bf

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

chatroom/register.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Register
2+
::: tip
3+
For more info please refer to: [Supabase Docs](https://supabase.com/docs/guides/auth/passwords?queryGroups=language&language=js&queryGroups=flow&flow=implicit#signing-up-with-an-email-and-password)
4+
:::
5+
6+
::: warning
7+
You must guide user to check their email so that they could verify their email address (You should send a link to their email).
8+
9+
**If the user haven't verified his/her email address** then he/she can't **Login**
10+
11+
*Must requires user to verify their email adderss!*
12+
:::
13+
14+
```ts
15+
async function signUpNewUser() {
16+
const { data, error } = await supabase.auth.signUp({
17+
email: '<email>', // 邮箱
18+
password: '<password>', // 密码
19+
options: {
20+
emailRedirectTo: 'https://localhost:5173/welcome', // 邮箱重定向的地方 | 可选。
21+
},
22+
})
23+
}
24+
```

0 commit comments

Comments
 (0)