pow_assent
pow_assent copied to clipboard
On necessity of having email column for users
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!