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

500 Error on generating the authorization-URL (click on login-button {openidConnectUri}) via route oidc/authentication #185

Closed
wrock opened this issue Dec 20, 2024 · 2 comments · Fixed by #186
Labels

Comments

@wrock
Copy link

wrock commented Dec 20, 2024

Thank you for this very cool extension and the effort and expertise you invest and share!

TYPO3 Version: 12.4.24
PHP: 8.1
causal/oidc: 3.0.0

User Story: On a fe-login-page the button to login via oidc is placed (to connect to Austria-ID). The URL of the button is generated correctly, same as in the previous version. Clicking the OIDC-Login-Button or calling the login-URL https://mysite.ddev.site/oidc/authentication?&validation_hash=a70efece5ffeb8481ce8adb5c3db4c2bb8f0c4b7&login_url=https%3A%2F%2Fmysite.ddev.site%2F&redirect_url= then calls the AuthenticationUrlRequest.php-Middleware that generates the Auth-Context via the OpenIdConnectService . Here I find a propperly enriched request-object.
After the call of $authorizationUrl = $this->OAuthService->getAuthorizationUrl($authorizationUrlOptions); in line 105 of OpenIdConnectService.php inside the OAuthService.php the $GLOBALS['TYPO3_REQUEST'] only has 1 attribute (applicationType), but no site-attribute. So no DefaultLanguage can be fetched (call on null in line 75 of OAuthService.php).

I don't see, why the $GLOBALS['TYPO3_REQUEST'] is not enriched correctly. The $request object in the middleware was enriched correctly...

@liayn liayn added the bug label Dec 20, 2024
@liayn
Copy link
Collaborator

liayn commented Dec 20, 2024

Thanks for the report and the debugging. Will take a look soon, what's going on here.

@liayn
Copy link
Collaborator

liayn commented Dec 20, 2024

I pushed a possible fix, but didn't test it yet. Please let me know @wrock if this works for you.

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

Successfully merging a pull request may close this issue.

2 participants