1
0
mirror of https://github.com/projekteuler/projekteuler.git synced 2026-01-26 18:18:51 +01:00

Add authentication via GitHub

This commit is contained in:
2019-02-04 16:06:09 +01:00
parent 8ba5608689
commit f70a5275f0
8 changed files with 50 additions and 3 deletions

View File

@@ -11,4 +11,8 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
def developer
sign_in_with "Developer"
end
def github
sign_in_with "GitHub"
end
end

View File

@@ -21,7 +21,11 @@
</b></span>
<%= link_to(t('application.sign_out'), destroy_user_session_path, method: :delete) %>
<% else %>
<% if Rails.env.development? %>
<%= link_to(t('application.sign_in'), user_developer_omniauth_authorize_path) %>
<% else %>
<%= link_to(t('application.sign_in'), user_github_omniauth_authorize_path) %>
<% end %>
<% end %>
<% end %>
<% end %>