clearance
clearance copied to clipboard
Single session per user while integrating with Omniauth Azure AD
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
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?
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?