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

On necessity of having email column for users #246

Open
erasmas opened this issue Nov 4, 2023 · 0 comments
Open

On necessity of having email column for users #246

erasmas opened this issue Nov 4, 2023 · 0 comments

Comments

@erasmas
Copy link

erasmas commented Nov 4, 2023

Hi, and thank you for pow_assent!

I'm using pow_assent with Strava provider for a pet project and it's been a quick and easy setup so far. I followed the quick setup guide and ended up with the users table which has email and password_hash columns. Since OAuth with Strava is used, there's no need to store user passwords and Strava doesn't provide emails, so these columns always left blank. What's worse is that email is a required field and should be unique, which forces users to provide their email. I'd like to remove email column and not force users to provided it on login, what's the best strategy to achieve that?

I'm thinking I could drop email and password_hash columns in a new migration, then remove pow_user_fields() from "users" schema. I will then have to set some other column with user_id_field. The real userid is the one provided by Strava, stored in user_identities.uid.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant