1- import { AuthBindings } from "@refinedev/core" ;
2-
1+ import { AuthProvider } from "@refinedev/core" ;
32import { supabaseClient } from "./utility" ;
43
5- const authProvider : AuthBindings = {
4+ const authProvider : AuthProvider = {
65 login : async ( { email, password, providerName } ) => {
76 // sign in with oauth
87 try {
98 if ( providerName ) {
10- const {
11- data,
12- error,
13- } = await supabaseClient . auth . signInWithOAuth ( {
14- provider : providerName ,
15- } ) ;
9+ const { data, error } =
10+ await supabaseClient . auth . signInWithOAuth ( {
11+ provider : providerName ,
12+ } ) ;
1613
1714 if ( error ) {
1815 return {
@@ -30,13 +27,11 @@ const authProvider: AuthBindings = {
3027 }
3128
3229 // sign in with email and password
33- const {
34- data,
35- error,
36- } = await supabaseClient . auth . signInWithPassword ( {
37- email,
38- password,
39- } ) ;
30+ const { data, error } =
31+ await supabaseClient . auth . signInWithPassword ( {
32+ email,
33+ password,
34+ } ) ;
4035
4136 if ( error ) {
4237 return {
@@ -103,12 +98,10 @@ const authProvider: AuthBindings = {
10398 } ,
10499 forgotPassword : async ( { email } ) => {
105100 try {
106- const {
107- data,
108- error,
109- } = await supabaseClient . auth . resetPasswordForEmail ( email , {
110- redirectTo : `${ window . location . origin } /update-password` ,
111- } ) ;
101+ const { data, error } =
102+ await supabaseClient . auth . resetPasswordForEmail ( email , {
103+ redirectTo : `${ window . location . origin } /update-password` ,
104+ } ) ;
112105
113106 if ( error ) {
114107 return {
0 commit comments