Reset password by phone frontend
What does this MR do and why?
part of #2049 (closed): recover password by phone
Describe in detail what your merge request does and why.
Screenshots or screen recordings
- Reset password
step | screenshot |
---|---|
reset page | |
captcha | |
geektest | |
sending | |
checking | |
new password (same as email) |
How to set up and validate locally
# pre-requirement
git checkout jh/LXY1226-reset-password-by-phone
# first ensure a clear gdk environment [optional]
gdk reset-data
# assign a phone number to a user eg.root
gdk rails console
# now you are in rails console
# First, enable RealNameSystem
setting = ::Gitlab::CurrentSettings.current_application_settings
setting.phone_verification_code_enabled = true
setting.save!
# Then, link an user with phone
root = User.first()
root.phone = Gitlab::CryptoHelper.aes256_gcm_encrypt("+8615800000000")
root.save!
# now root has a valid phone number `+86 15800000000`
# !!! need setup a bunch of environment here !!!
# everything done
gdk restart
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
由 Xueyuan Lin 编辑于