User has changed their Google account and cannot login

faq-material

(Michael Brown) #1

Problem

This situation arises when

  • the user logs into their account using Google authentication
  • the user then tries to log into their account using a different Google account that still matches their Discourse account

The user will see

  • a blank screen after attempted login (pre 2017-12-21)
  • or, a generic HTTP Error code 500 (pre 2017-12-21)
  • or, the following message:
    image

This can happen when

  • the user changes their email address then logs in with a new Google account matching their new email
  • the user has their Google account recreated (in a managed scenario)
  • the user had their Google account deleted, but someone has created a new one matching the previous email address. This scenario does not happen often and could potentially be malicious intent.

Solution

The scenario involving a normal email address change has been recently (2017-12-21) fixed and will automatically be handled by installs after that date as described here.

The fix involves deleting the previously cached Google account information for the user from the rails console:

User.find_by_username('Ā«DISCOURSE_USERNAMEĀ»').google_user_info.destroy_all

Hosted customers (without access to the rails console) can contact us through the usual support channels to perform this operation.