openid-connect-generic icon indicating copy to clipboard operation
openid-connect-generic copied to clipboard

Redirect to /connect/authorize IdP using User Switching Plugin + SSO enabled

Open alextochetto opened this issue 1 year ago • 6 comments

Describe the bug After login in a IdP, use the User Switching plugin to impersonate another user and a happens to /connect/authorize of IdP. This redirect authenticate the same user and the impersonate comes back to the logged user. If the login uses the button in form login, this scenario doesn't happen and everything works fine.

To Reproduce Steps to reproduce the behavior:

  1. Install User Switching plugin (https://wordpress.org/plugins/user-switching)
  2. Configure the OpenID Connect Generic
  3. Enable SSO
  4. Authenticate with user 'X'
  5. Switch to user 'Y'

Screenshots image

Expected behavior Impersonate to user 'Y' as the same way when the configuration hasn't SSO enabled

WordPress Environment

  • Website URL: local
  • PHP Version:
  • WordPress Version: 6.6.1
  • Plugin Version: 3.10.0
  • Identity Provider: my own Idp
  • Relevant Plugin Settings:

alextochetto avatar Aug 27 '24 17:08 alextochetto

This is not really a bug. This plugin doesn't support use with user switching/impersonation. It is essentially against using SSO/an IDP to impersonate another user.

timnolte avatar Aug 27 '24 17:08 timnolte

This is not really a bug. This plugin doesn't support use with user switching/impersonation. It is essentially against using SSO/an IDP to impersonate another user.

I agree with you about impersonating another user, but my client needs this feature. Do you have any tips to jump on this request to help me, this plugin is the only one I found to solve my problem, we are moving from Auth0 IdP to our own IdP. Could you help me?

Thanks for your time and quick answer Regards Alex

alextochetto avatar Aug 27 '24 18:08 alextochetto

@alextochetto i just tried to reproduce since we do have the same requirement. Sadly i can't. Do you have some more details?

JUVOJustin avatar Aug 27 '24 18:08 JUVOJustin

@alextochetto i just tried to reproduce since we do have the same requirement. Sadly i can't. Do you have some more details?

@JUVOJustin , how did you configure the environment? Did you enable the Login Type to Auto Login - SSO in plugin configuration?

  1. You need to login with a user using IdP
  2. This user must have Administrator profile
  3. Then use User Switching plugin to switch user like the image below

image

The wordpress will try to switch, but keep the actual user logged and cancel the switch If you need more information let me know

alextochetto avatar Aug 27 '24 19:08 alextochetto

@timnolte , are you interested in being paid for this enhancement?

alextochetto avatar Aug 28 '24 12:08 alextochetto

@alextochetto you are right i did not configure Auto Login. Will check and give it a try.

JUVOJustin avatar Sep 03 '24 05:09 JUVOJustin