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

Google logo loads as a big image for a split second at load #101

Closed tomasroaldsnes closed 1 year ago

tomasroaldsnes commented 1 year ago

Bug report

Describe the bug

With Google provider enabled, the Google logo is huge for a split second when loading the view.

To Reproduce

Loading this view. <Auth supabaseClient={supabase} appearance={{ theme: ThemeSupa, variables: { default: { colors: { brand: "#3d808c", brandAccent: "#2c5b63", }, }, }, }} providers={["google"]} magicLink localization={{ variables: { sign_in: { email_label: "Din epostadresse", password_label: "Ditt passord", email_input_placeholder: "Epost", password_input_placeholder: "Passord", social_provider_text: "Logg inn med", button_label: "Logg inn", link_text: "Har du allerede en konto? Logg inn", }, sign_up: { email_label: "Din epostadresse", password_label: "Ditt passord", email_input_placeholder: "Epost", password_input_placeholder: "Passord", social_provider_text: "Logg inn med", button_label: "Opprett konto", link_text: "Har du ikke en konto? Opprett konto", }, magic_link: { email_label: "Din epostadresse", email_input_placeholder: "Epost", button_label: "Send innloggingslenke på epost", link_text: "Logg inn uten passord", }, forgotten_password: { email_label: "Din epostadresse", password_label: "Ditt passord", email_input_placeholder: "Epost", button_label: "Send meg nytt possord på epost", link_text: "Har du glemt passordet?", }, update_password: { password_label: "Nytt passord", password_input_placeholder: "Ditt nye passord", button_label: "Oppdater passordet", }, }, }} />

Expected behavior

Not seeing a huge Google logo when loading the view.

System information

All devices

tomasroaldsnes commented 1 year ago

I think I found the problem. `

`

Width and height for button image are set as 512px.

tomasroaldsnes commented 1 year ago

https://github.com/supabase/auth-ui/blob/main/packages/react/src/components/Auth/Icons.tsx#L14-L15 These should be changed to actual sizes.

avgupta456 commented 1 year ago

I am also running into this problem. Did you find a temporary fix?

rdylina commented 1 year ago

Came here to report this very issue.

bookvacuum commented 1 year ago

experiencing the same issue

silentworks commented 1 year ago

A fix was submitted by @rdylina that got released in version 0.3.5 for auth-ui-react.