supabase-community / auth-ui

Pre-built Auth UI for React
https://supabase.com/docs/guides/auth/auth-helpers/auth-ui
MIT License
487 stars 121 forks source link

TypeError: supabaseClient.auth.signInWithPassword is not a function #35

Closed marcello-palmitessa closed 1 year ago

marcello-palmitessa commented 1 year ago

Bug report

Describe the bug

Using the Auth component with only email authentication, I get the error when the login form is submitted: ` Unhandled Runtime Error TypeError: supabaseClient.auth.signInWithPassword is not a function

Call Stack eval node_modules/@supabase/auth-ui-react/dist/esm/src/components/Auth/interfaces/EmailAuth.js (61:10) `

To Reproduce

My code is: <Auth supabaseClient={supabaseClient} providers={[]} />

Expected behavior

I expect

Screenshots

If applicable, add screenshots to help explain your problem.

System information

MildTomato commented 1 year ago

@marcello-palmitessa this seems like supabase-js is not installed.

Have you got the latest supabase-js@rc installed ?

npm install @supabase/supabase-js@rc @supabase/auth-ui-react

marcello-palmitessa commented 1 year ago

I missed that the auth-ui package reference the new 2.x RC version of supabase-js... I was using the latest stable 1.3.7... that's it.

Thanks to point me there, @MildTomato