timothymiller / t4-app

A powerful cross-platform UI toolkit for building actually native iOS, Android, macOS, Windows, Linux, and Progressive Web Apps with React (Native).
https://t4stack.com
MIT License
1.31k stars 70 forks source link

Supabase Google provider scope authorization error. #76

Closed honeydreamssoftwares closed 9 months ago

honeydreamssoftwares commented 9 months ago

When logging in in the default T4 template after adding Supabase credentials in env the Google Auth fails with Authorization error. Sign-in-Google-Accounts

It seems that the scopes are provided in the file https://github.com/timothymiller/t4-app/blob/eaec461e0a69a8113a3d90bee25d868fcbd5cefb/packages/app/features/sign-in/screen.tsx at line 18. I locally fixed the issue by adding options: { scopes: 'https://www.googleapis.com/auth/userinfo.email, https://www.googleapis.com/auth/userinfo.profile' }, since I plan to use only Google provider but that does not seem optimal solution as Supabase can have multiple providers each having its own unique scope.

Steps to reproduce

Platform Windows 11, WSL, Ubuntu 22, Node 18.

timothymiller commented 9 months ago

Thanks for the heads up.

I'm not clear if the other providers require a special scope passed to work.

It may be just a Google thing