Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenID login in TYPO3 >=8.7.31 broken #29

Closed
sirdiego opened this issue Apr 6, 2020 · 10 comments
Closed

OpenID login in TYPO3 >=8.7.31 broken #29

sirdiego opened this issue Apr 6, 2020 · 10 comments

Comments

@sirdiego
Copy link

sirdiego commented Apr 6, 2020

This core commit TYPO3/typo3@0d5ae4e introduced the usage of symfony/http-foundation for some cookie handling. This broke the openid extension. 8.7.30 works fine, 8.7.31 and 8.7.32 are broken. My guess would be it has something to do with a $_COOKIE check somewhere, but I did not have the time, jet, to inspect the problem more.

@liayn
Copy link
Member

liayn commented Apr 6, 2020

I guess this not really broken in the extension, but you need to configure the new setting of TYPO3 differently. The browsers (foremost Chrome) are enforcing this now. (Albeit they relaxed it again as of yesterday due to COVID-19)

@liayn liayn self-assigned this Apr 6, 2020
@liayn liayn added the question label Apr 6, 2020
@sirdiego
Copy link
Author

sirdiego commented Apr 6, 2020

Hey @liayn, thanks for the feedback. I installed a fresh TYPO3 and only added the openid extension. Only default settings. Do I have to do something to make it work with TYPO3 and extension default configuration? If it is not a technical problem maybe we should "solve" this through documentation?

@liayn
Copy link
Member

liayn commented Apr 6, 2020

Do you use openid for BE or FE authentication?

@sirdiego
Copy link
Author

sirdiego commented Apr 6, 2020

I'm sorry, I should have clarified. It's backend only for us.

@liayn
Copy link
Member

liayn commented Apr 6, 2020

Check if it helps to modify TYPO3_CONF_VARS|BE|cookieSameSite = none

@sirdiego
Copy link
Author

sirdiego commented Apr 6, 2020

Still does not work. I created a completely fresh instance with:

composer create-project "typo3/cms-base-distribution:^8.7" my-new-project
cd my-new-project
composer require friendsoftypo3/openid
touch public/FIRST_INSTALL

I then clicked through the install wizard and added my OpenID URL to the newly created admin user. When I try to log in to the backend via OpenID it redirects me back to this URL: http://my-lando-app.lndo.site/typo3/index.php?commandLI=setCookie. And shows the error message:

Your login attempt did not succeed
Make sure to spell your username and password correctly, including upper/lowercase characters.

2020-04-06-131745_389x565_scrot

Changing TYPO3_CONF_VARS|BE|cookieSameSite does not change that behavior.

Does this clarify the problem?

@liayn
Copy link
Member

liayn commented Apr 7, 2020

I tried my best to analyze the issue, but I fail to do that properly as I do not have an openid provider anymore myself. All usual ones (M$, Google, Mozilla etc) have been shut down. Generally OpenID 2.0 as used here has been superseded by OpenID Connect.

@liayn
Copy link
Member

liayn commented Apr 7, 2020

I updated the extension now to include the latest release of the upstream php-openid libaray. Maybe this helps here.

@liayn liayn removed their assignment Apr 7, 2020
@dmitryd
Copy link
Contributor

dmitryd commented Apr 25, 2020

In your web/typo3conf/LocalConfiguration.php:

return [
  'BE' => [
    'cookieSameSite' => 'lax',
    ...
 ],
];

This will be documented.

@dmitryd dmitryd closed this as completed Apr 25, 2020
@sirdiego
Copy link
Author

sirdiego commented Dec 7, 2020

I'm a little late here, but thanks for the hint. Setting cookieSameSite to lax does indeed work. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants