Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confirm email switch dashboard UI bug #9897

Closed
tekagg opened this issue Oct 27, 2022 · 3 comments
Closed

Confirm email switch dashboard UI bug #9897

tekagg opened this issue Oct 27, 2022 · 3 comments
Labels
bug Something isn't working frontend Related to supabase dashboard

Comments

@tekagg
Copy link

tekagg commented Oct 27, 2022

Bug report

Describe the bug

There is a visual bug in the UI Dashboard for the Authentication Settings / Auth Providers / Email / Confirm email switch. The switch visually updates its state only after page refresh but not on save.

To Reproduce

Go to Authentication Settings / Auth Providers / Email, turn on or off the Confirm email switch and click the Save button.
The state of the switch in the UI will only remain saved after page refresh, but not on save

@tekagg tekagg added the bug Something isn't working label Oct 27, 2022
@tekagg
Copy link
Author

tekagg commented Oct 27, 2022

I guess the issue comes from here where it resets the values to the payload which contains the inversed values for mail confirm and SMS confirm switches

resetForm({ values: payload, initialValues: payload })

Untested possible fix: https://github.com/agalbenus/supabase/blob/master/studio/components/interfaces/Auth/AuthProvidersForm/ProviderForm.tsx#L49

If I have time I will test the changes myself and create a PR

@saltcod saltcod added the frontend Related to supabase dashboard label Oct 28, 2022
@ShaneMaglangit
Copy link

ShaneMaglangit commented Nov 6, 2022

I would like to work on this issue so I did some initial investigation on it.

It seems like the payload returned by https://api.supabase.io/platform/auth/<project>/config returns the opposite value for MAILER_AUTOCONFIRM than what it was set on. Thus, every time any change is saved, the switch loads with the opposite state.

Is api.supase.io/platform open source? I can't seem to find the directory nor the repository responsible for this endpoint.

@GaryAustin1
Copy link
Contributor

I believe this has been fixed. I don't see any issues after toggling or saving the setting.
Maybe more complex to replicate.
Going to close this. Please comment if I am mistaken or you believe it still exists, possibly with more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend Related to supabase dashboard
Projects
None yet
Development

No branches or pull requests

4 participants