Skip to content

Commit

Permalink
Add emailRedirectTo to signup in React (#128)
Browse files Browse the repository at this point in the history
* Add emailRedirectTo to signup in React

* Update EmailAuth.tsx

---------

Co-authored-by: Andrew Smith <a.smith@silentworks.co.uk>
  • Loading branch information
pmaddi and silentworks committed Feb 28, 2023
1 parent fb7a9c5 commit dde7c4d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/friendly-ants-float.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@supabase/auth-ui-react': patch
---

Add emailRedirectTo property to the EmailAuth component's signUp method
3 changes: 3 additions & 0 deletions packages/react/src/components/Auth/interfaces/EmailAuth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ function EmailAuth({
} = await supabaseClient.auth.signUp({
email,
password,
options: {
emailRedirectTo: redirectTo
}
})
if (signUpError) setError(signUpError.message)
// Check if session is null -> email confirmation setting is turned on
Expand Down

0 comments on commit dde7c4d

Please sign in to comment.