Using MetadataField for boolean values
Feature request
I'd like to add some checkboxes on new user signup for consenting to terms of service and opt-in to marketing emails. I'd like this to be integrated into the auth ui.
Is your feature request related to a problem? Please describe.
MetadataField assumes the only values we want from users on signup are text, like username. I looked at extrametadata but (forgive me if I'm wrong) that doesn't seem to allow the user to edit values.
Describe the solution you'd like
Potentially a different class, e.g. BooleanMetadataField, with a checkbox widget, or perhaps a new property on MetadataField to specify what kind of metadata to solicit from the user
Describe alternatives you've considered
Apologies if there's some obvious solution here that I'm missing. This is my first time working on auth so I'm a bit unfamiliar with what the best practices are (which is why I'm using this package rather than trying to roll my own auth form).
To clarify, I'm using the SupaEmailAuth form.
This is a great suggestion! Would you like to have a stab at creating a PR for it?
Sure! My apologies, I should have offered to do so when I filed this.
In cases where user consent is required (e.g. users must agree to terms of service to sign up), I can add a property to allow disabling the form submit button if the box is not checked.
Not sure when I'll start work on this, but I'll aim to get a pull request together within the next two weeks or so.
I am so sorry, I completely forgot about this! I'll get a PR done after I fix the other bug I just filed