FIX: Use user account email instead of auth email when totp is enabled.

https://meta.discourse.org/t/github-2fa-flow-broken/88674
This commit is contained in:
Guo Xiang Tan
2018-05-30 12:14:04 +08:00
parent 543b7cddfb
commit 21e9315416
2 changed files with 8 additions and 1 deletions

View File

@ -120,6 +120,7 @@ class Users::OmniauthCallbacksController < ApplicationController
def user_found(user)
if user.totp_enabled?
@auth_result.omniauth_disallow_totp = true
@auth_result.email = user.email
return
end