Closed (fixed)
Project:
Redirect 403 to User Login
Version:
2.0.0
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Oct 2020 at 23:01 UTC
Updated:
3 Jan 2024 at 01:24 UTC
Jump to comment: Most recent
Comments
Comment #2
nixou commentedCan you please provide more information on how to configure the module Social Auth Google to reproduce this problem ?
Could you also test on the 2.x-dev version to see if the problem is still present ?
Thanks you.
Comment #3
playful commentedThis appears to be an issue with Social Auth or Social API, not only the Google module. I have now removed the Google module as it's not yet compatible with Social Auth/API v. 3, but I'm having the same issue with the latest version of Social Auth LinkedIn.
I'm using the 2.x-dev version of r4032login and get the following two errors in log each time a login is attempted:
php error:
LogicException: The controller must return a response (null given). Did you forget to add a return statement somewhere in your controller? in Symfony\Component\HttpKernel\HttpKernel->handleRaw() (line 169 of /home/username/website.com/web/vendor/symfony/http-kernel/HttpKernel.php).social_auth_linkedin error:
Failed to authenticate user. Exception: The user-entered string 'node/add/event' must begin with a '/', '?', or '#'.All the modules are with their default settings. Although the social_auth_linkedin error says "Failed to authenticate user," the authentication is actually successful and the user is logged in when returning from the WSOD.
Thanks for your help!
Comment #4
playful commentedThis only seems to bee an issue when the r4032login setting "Redirect user to the page they tried to access after login" is enabled. My apologies for not clarifying that earlier.
Comment #5
dravenkAccording to the OAuth 2.0 specification (section 3.1.2 of RFC 6749). The redirection endpoint URI MUST be an absolute URI as defined by [RFC3986] Section 4.3.
https://www.drupal.org/docs/contributed-modules/social-api/social-api-2x...
Comment #6
dravenkComment #8
dravenkhttps://git.drupalcode.org/project/drupal/-/blob/9.2.x/core/lib/Drupal/C...
Drupal's core methods dictate the rules for these paths. Doesn't make sense to remove the prefix of the path.
Comment #9
epapaniko commentedTested with a site that is under a subdirectory and release 2.1.0 stripped the base path, causing a wrong destination path.
This patch fixed the bug, thank you.
Comment #10
nixou commentedThank you for that.
I tried to update your merge request with latest dev from 2.x but I realized the modification you've made is already on 2.x.
So probably another issue fixed this one.
Could you please retest with the 2.x branch and tell me if the problem is gone ?
Comment #11
dravenk