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

Allow override of provider sign-in logic #15

Merged

Conversation

@zorab47
Copy link
Contributor

@zorab47 zorab47 commented Oct 13, 2017

Override the default sign in behavior of Devise (and later other providers) by configuring a AnyLogin.sign_in proc to execute. This is a proof of concept for further discussion about issue #14.

Example

AnyLogin.setup do |config|
  config.sign_in = proc do |loginable|
    # Assume permissions of another user instead of logging in as that user
    current_admin_user.update_columns(assume_permissions_of_admin_user_id: loginable)
  end
end
Override the default sign in behavior of Devise (and later other
providers) by configuring a `AnyLogin.sign_in` proc to execute.
@zorab47 zorab47 changed the title Allow override of the Devise sign in logic Allow override of provider sign-in logic Oct 13, 2017
@zorab47 zorab47 mentioned this pull request Oct 13, 2017
@igorkasyanchuk igorkasyanchuk merged commit a46669e into igorkasyanchuk:master Oct 18, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants