supabase-community / auth-ui

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

UpdatePassword view password input placeholder not showing #241

Closed ShreyaRavi closed 9 months ago

ShreyaRavi commented 9 months ago

Bug report

Describe the bug

In the update_password view of the AuthUI, the placeholder used in the input for the new password is password_label rather than password_input_placeholder.

To Reproduce

Use the component

<Auth
    supabaseClient={supabase}
    view={'update_password'}
    providers={[]}
    socialLayout="vertical"
    theme="dark"
    localization={{
        variables: {
            update_password: {
                password_label: 'Password label',
                password_input_placeholder: 'Password placeholder',
            }
        },
    }}
/>

Expected behavior

You expect to see "Password label" above the input and "Password placeholder" in the input.

Screenshots

You see "Password label" both above and in the input. image

System information

Additional context

The solution is to update this line https://github.com/supabase/auth-ui/blob/19e380253000b867dc1bf71af7084bfbb1d53fb7/packages/react/src/components/Auth/interfaces/UpdatePassword.tsx#L44

and change labels?.password_label to labels?.password_input_placeholder