- Issue created by @mortona2k
- First commit to issue fork.
- Merge request !6Draft: Resolve #3449710 "Return path not found" β (Closed) created by cesarmsfelipe
- Assigned to cesarmsfelipe
- πͺπΈSpain cesarmsfelipe
Hi @mortona2k, I have made some changes that fix the problem, adding routing and fixing some user sync issues. Could you try with the beta1 tag and check if you can now use the module correctly?
- Status changed to RTBC
6 months ago 11:49pm 26 May 2024 - πΊπΈUnited States mortona2k Seattle
I just got it working. It looks like the user sync isn't working.
I got these errors on my SP site when the users only on the IDP site:
11632 26/May 16:44 sso_connector Critical Failed to synchronize or log in the user with email goodbye@example.com, redirecting to error.
11631 26/May 16:44 sso_connector Error User not found or failed to load during SSO with email goodbye@example.com.
11630 26/May 16:44 sso_connector Info Redirecting to IdP for authentication.With the user existing in both places, it redirects to the IDP login, and on save, redirects back to the SP site where I'm logged in.
- πͺπΈSpain cesarmsfelipe
Hi, thanks @mortona2k, glad to hear it's working for you. Regarding the user synchronization, you should have the box checked in both IdP and SP, they are both checked and you still have that error?
- πͺπΈSpain cesarmsfelipe
I have retested the whole process. I have fixed and refined some parts of the synchronization code, now it will work even if the user does not exist in the SP. Can you try with beta2 tag. Thanx!
- Status changed to Needs review
6 months ago 7:56am 27 May 2024 - πΊπΈUnited States mortona2k Seattle
I had the sync SP checkbox set on both sites.
Still getting the same results in beta 2. I can log in with a synced account, but not if it's unsynced.
I am also seeing this message intermittently:
To log in to this site, your browser must accept cookies from the domain projects.mantra.lndo.site.
I added both sites as exceptions for my browser cookies in firefox, but still see the warning.
- πͺπΈSpain cesarmsfelipe
Hi @mortona2k, I have checked the problem you report and there should no longer be a problem with synchronization disabled. I have also overwritten the behavior of the cookie provided by the core to avoid this error. I'm going to create a new beta3 tag, can you test if the problem is solved? Thank you.
- Status changed to Needs work
6 months ago 3:56pm 3 June 2024 - πΊπΈUnited States mortona2k Seattle
It's still not working for me, same error.
Can you add some debug logs or point me towards what to check?
- πͺπΈSpain cesarmsfelipe
Hi @mortona2k, Can you give me more information about the problem, I have three websites with the module in place, and I don't get the same error you describe, as I have the latest beta version.
If you need to check something, try to debug the SsoController.php, but the error you described above is fixed with the latest version, at least in my case.
Try to give me some more information so I can help you, thanks! - Status changed to Needs review
6 months ago 2:09am 10 June 2024 - πΊπΈUnited States mortona2k Seattle
Got it working.
In SsoController:loginUserByEmail, $this->userSync->synchronizeUser() would fire, but then the next line was returning an empty array, not the new user.
It looks like it should get saved in $this->userSync->updateUserData(), but the $user instanceof UserInterface check fails because it gets an empty array.
Saving the user in $this->userSync->synchronizeUser() gets it working, but there should be some other adjustment to the logic. I don't know if a new user entity could be presaved somehow so it gets returned in the lookup. If not, maybe saving it here is fine.
Thanks for your work on this.
- Status changed to Fixed
5 months ago 11:00am 17 June 2024 - πͺπΈSpain cesarmsfelipe
Thanks for your help and work @mortona2k, and sorry for the delay in replying. I hope the module works for you and I would appreciate if you have suggestions for improvements for it. Best regards!
Automatically closed - issue fixed for 2 weeks with no activity.