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
merged 1 commit into from Oct 18, 2017

Conversation

Projects
None yet
2 participants
@zorab47
Contributor

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
Allow override of the Devise sign in logic
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 from Allow override of the Devise sign in logic to Allow override of provider sign-in logic Oct 13, 2017

@zorab47 zorab47 referenced this pull request Oct 13, 2017

Open

Custom Login Providers #14

@igorkasyanchuk igorkasyanchuk merged commit a46669e into igorkasyanchuk:master Oct 18, 2017

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