verbb / social-login

A Craft CMS plugin to add SSO (Single Sign-On) user login, registration and connecting to social media platforms.
Other
4 stars 6 forks source link

CP Sign-in missing after Craft 5 Upgrade #28

Closed tomkiss closed 3 weeks ago

tomkiss commented 3 months ago

Describe the bug

After upgrading to Craft 5, the CP login no longer appears.

I've not changed any settings or altered the config. The only integration I have is Google.

Craft 4:

image

Craft 5:

image

Steps to reproduce

  1. Have a Craft 4 instance with Social Login working with Google integration and CP sign-on enabled.
  2. Perform a site upgrade to Craft 5, following the usual upgrade flow.
  3. See if the CP login screen includes the Google sign-in link.

Craft CMS version

5.1.3

Plugin version

2.0.1

Multi-site?

No

Additional context

No response

engram-design commented 3 months ago

Fixed for the next release. To get this early, run composer require verbb/social-login:"dev-craft-5 as 2.0.1".

tomkiss commented 3 months ago

HI @engram-design - thanks for the fix, this has made the button appear now.

Unfortunately, when clicking it, after signing in to Google, I am booted back to the login screen. However, if I change the URL to the root CP url, /admin then I am actually signed in, there is an active session.

So there's a sort of dodgy redirect going on here. I only have Google as an integration.

I rolled back to my previous Craft 4.X version which worked as expected, but upon upgrading back to Craft 5 the same issue occurs.

engram-design commented 3 months ago

This seems to be due to Craft 5's behaviour of redirecting to /admin/login when trying to login, and that's used for the return URL. When logged in and loading that page, it doesn't seem to redirect to the control panel like it does in Craft 4.

You can confirm this by taking Social Login completely out of the equation and just login to the control panel "normally", and load /admin/login to be shown the login screen, despite being logged in already.

I'll raise this with Craft itself...

ishetnogferre commented 3 months ago

@engram-design any updates from Craft on this issue? 😄

engram-design commented 2 months ago

Should be fixed in an upcoming Craft version https://github.com/craftcms/cms/issues/15168#issuecomment-2156061985

engram-design commented 3 weeks ago

Fixed in Craft 5.2.0