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:
@@ -11,4 +11,8 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
||||
def developer
|
||||
sign_in_with "Developer"
|
||||
end
|
||||
|
||||
def github
|
||||
sign_in_with "GitHub"
|
||||
end
|
||||
end
|
||||
@@ -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 %>
|
||||
|
||||
Reference in New Issue
Block a user