phewsh 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/supabase.js +2 -7
- package/package.json +1 -1
package/lib/supabase.js
CHANGED
|
@@ -18,16 +18,11 @@ async function req(path, options = {}, accessToken = null) {
|
|
|
18
18
|
return res;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
// Send
|
|
21
|
+
// Send numeric OTP to email (omitting redirect_to forces a code, not a magic link)
|
|
22
22
|
async function sendOtp(email) {
|
|
23
|
-
// redirect_to ensures magic links (if project uses them) land on /intent, not root
|
|
24
23
|
const res = await req('/auth/v1/otp', {
|
|
25
24
|
method: 'POST',
|
|
26
|
-
body: JSON.stringify({
|
|
27
|
-
email,
|
|
28
|
-
create_user: true,
|
|
29
|
-
options: { redirect_to: 'https://phewsh.com/intent' },
|
|
30
|
-
}),
|
|
25
|
+
body: JSON.stringify({ email, create_user: true }),
|
|
31
26
|
});
|
|
32
27
|
return res.ok;
|
|
33
28
|
}
|