oidc-wp / openid-connect-generic

WordPress plugin to provide an OpenID Connect Generic client
https://wordpress.org/plugins/daggerhart-openid-connect-generic/
258 stars 154 forks source link

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

Open alextochetto opened 2 weeks ago

alextochetto commented 2 weeks ago

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

timnolte commented 2 weeks ago

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.

alextochetto commented 2 weeks ago

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

JUVOJustin commented 2 weeks ago

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

alextochetto commented 2 weeks ago

@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 commented 2 weeks ago

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

JUVOJustin commented 1 week ago

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