Skip to content

Commit

Permalink
fix: omniauth users are confirmed directly at sign up
Browse files Browse the repository at this point in the history
  • Loading branch information
moustachu committed Dec 8, 2023
1 parent 0ce4a36 commit a853522
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,22 @@ def after_sign_in_path_for(user)
super
end
end

private

def verified_email
@verified_email ||= find_verified_email
end

def find_verified_email
if oauth_data.present?
session["oauth_data.verified_email"] = oauth_data.dig(:info, :email)
else
email_from_session = session["oauth_data.verified_email"]
session.delete("oauth_data.verified_email")
email_from_session
end
end
end
end
end

0 comments on commit a853522

Please sign in to comment.