Problem/Motivation

After updating to 2.0.0 on D8.9.7 this module is not working with the Social Auth Google module and causes a WSOD error when redirecting from the Social Auth Google login.

The php error in Drupal log:

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).

Help greatly appreciated!

Issue fork r4032login-3179773

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

playful created an issue. See original summary.

nixou’s picture

Status: Active » Postponed (maintainer needs more info)

Can 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.

playful’s picture

This 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!

playful’s picture

This 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.

dravenk’s picture

Status: Postponed (maintainer needs more info) » Active

According 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...

dravenk’s picture

dravenk’s picture

https://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.

epapaniko’s picture

Tested 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.

nixou’s picture

Status: Active » Postponed (maintainer needs more info)

Thank 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 ?

dravenk’s picture

Status: Postponed (maintainer needs more info) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.