https://supabase.com/ logo
Send OTP via Email. I think this is an interesti...
# off-topic
g
Send OTP via Email. I think this is an interesting new feature in today's launch week blog https://supabase.com/blog/2022/03/28/community-day. Basically you no longer need to rely on an email redirect to confirm email, password changes, etc. This is very important for single page apps and home screen apps where redirect opens a different browser window from the app. You can add {{.Token}} to your email templates and get (see pic below): Then in your code ask for the token/code and call this:
Copy code
const {user,error} = await supabase.auth.verifyOTP ({
    email:'name@email.com',
    token:'owOWaODcyzG0ItuHQ24ipA',
    type:'signup'   //use correct type for operation
})
Cool! This solves one of the biggest signup/auth issues I had with my PWA (homescreen app)