Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: omniauth users are confirmed directly at sign up #94

Merged
merged 1 commit into from
Dec 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading