Skip to content

Allow override of provider sign-in logic#15

Merged
igorkasyanchuk merged 1 commit into
igorkasyanchuk:masterfrom
zorab47:allow-custom-sign-in-logic
Oct 18, 2017
Merged

Allow override of provider sign-in logic#15
igorkasyanchuk merged 1 commit into
igorkasyanchuk:masterfrom
zorab47:allow-custom-sign-in-logic

Conversation

@zorab47

@zorab47 zorab47 commented Oct 13, 2017

Copy link
Copy Markdown
Contributor

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants