roadmap
roadmap copied to clipboard
Unassigned variable in `OmniauthCallbacksController#handle_omniauth`
Issue Description
In the OmniauthCallbacksController, an unassigned variable appears to be referenced in the following code:
In app/controllers/users/omniauth_callbacks_controller.rb, line 57-58:
flash[:alert] = _("The current #{scheme.description} iD has been already linked to a user with email #{identifier.user.email}")
The identifier variable is not defined or assigned anywhere in this method. This would cause a NoMethodError: undefined local variable or method 'identifier' if this code path is executed.
Verification Needed
This issue was identified through code review but hasn't been fully tested in a live environment. Verification of the issue and testing of any fix would be valuable.
Possible Solution
The code likely needs to reference the user variable that was found by the omniauth lookup, or needs to properly assign the identifier object before referencing it.