-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
356ecc6
commit d354bef
Showing
8 changed files
with
21 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ AllCops: | |
|
||
|
||
Metrics/AbcSize: | ||
Max: 17 | ||
Max: 30 | ||
Severity: error | ||
|
||
Metrics/ClassLength: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,12 @@ | ||
class OmniauthCallbacksController < Devise::OmniauthCallbacksController | ||
def openid_connect | ||
require 'pry'; binding.pry # rubocop:disable Style/Semicolon,Lint/Debugger | ||
# You need to implement the method below in your model (e.g. app/models/user.rb) | ||
@user = Person.from_omniauth(request.env['omniauth.auth']) | ||
|
||
if @user.persisted? | ||
sign_in_and_redirect @user, event: :authentication # this will throw if @user is not activated | ||
set_flash_message(:notice, :success, kind: 'Facebook') if is_navigational_format? | ||
else | ||
session['devise.facebook_data'] = request.env['omniauth.auth'] | ||
redirect_to new_user_registration_url | ||
end | ||
@user.save | ||
sign_in_and_redirect @user, event: :authentication # this will throw if @user is not activated | ||
set_flash_message(:notice, :success, kind: 'Keycloak') if is_navigational_format? | ||
end | ||
|
||
def failure | ||
require 'pry'; binding.pry # rubocop:disable Style/Semicolon,Lint/Debugger | ||
redirect_to root_path | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.