Skip to content

Impersonation and programmatical login #236

Discussion options

You must be logged in to vote

Ok, I found a solution. As I written above clear_session deleted all session keys, no matter what configuration created them.
My main configuration had remeber feature enabled. So here is what happened:

  1. You click on "impersonate" button
  2. Controller action logged in impersonated user
  3. clear_session was called, and removed all session keys
  4. remember feature from the main configuration checked that session is not valid (it didn't exist) and restored it and called clear_session again, which cleared impersonated user session.

Don't know is it a bug or not, but for now I fixed this by redefining clear_session.

# frozen_string_literal: true

class RodauthImpersonate < Rodauth::Rails::Auth
  confi…

Replies: 2 comments 11 replies

Comment options

You must be logged in to vote
1 reply
@igor-alexandrov
Comment options

Comment options

You must be logged in to vote
10 replies
@igor-alexandrov
Comment options

@igor-alexandrov
Comment options

@igor-alexandrov
Comment options

@igor-alexandrov
Comment options

Answer selected by igor-alexandrov
@janko
Comment options

@igor-alexandrov
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants