Skip to content

Single session per user while integrating with Omniauth Azure AD #885

Open

Description

@sithara

Is there a workaround to prevent concurrent user signs while using Azure AD for authentication

The below code snippet is likely to work only if the default sign in mechanism is used

  def sign_in(user)
    user.reset_remember_token! if user
    super
  end 

Thanks

Activity

  1. mjankowski commented on Mar 5, 2020

    @mjankowski
    Contributor

    Can you add a little detail about what you want to happen?

    My guess is that you're using clearance for session maintenance ... but want to actually auth with another service/lib and then have a callback/hook into clearance to reset that user's session when they sign in?

  2. sithara commented on Mar 6, 2020

    @sithara
    Author

    Thanks for the prompt response @mjankowski .

    I had integrated gem 'omniauth-azure-activedirectory' with my application. Using the creds from azure active directory I activate the clearance user sessions, and this works perfectly.

    I was trying to implement block concurrent user sign in. How do I force the user to logout of his first instance if he has initiated a second one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions