Feat: allow users to login with phone number
Closes #945
This MR is only working on allowing users to sign in with their phone numbers since there is a serial of issues for adding the login with phone number feature.
The find_for_database_authentication
has been overrode in ee/models/user.rb
to enable signing in with email
and username
, so we'd better to put our code at there either. To enable unfinished code to be deployed, a feature flag should be added.
Proposal
- Add a feature flag named
phone_authenticatable
- Override method
find_for_database_authentication
inuser.rb
How to test
- Create a new account with phone number provided
- Sign in with phone number
- You should sign in successfully
由 Martin Tan 编辑于