Skip to content

Conversation

@melroy89
Copy link
Member

@melroy89 melroy89 commented Nov 16, 2025

When using Interstellar I was trying to relogin on my kbin.melroy.org. However, I was faced with an Internal Server Error (500 server error coming from oauth2-server-bundle) 😢 .

Logging said:

{"message":"Uncaught PHP Exception RuntimeException: \"A logged in user is required to resolve the authorization request.\" at AuthorizationRequestResolveEventFactoryTrait.php line 44","context":{"exception":{"class":"RuntimeException","message":"A logged in user is required to resolve the authorization request.","code":0,"file":"/var/www/kbin.melroy.org/html/vendor/league/oauth2-server-bundle/src/Event/AuthorizationRequestResolveEventFactoryTrait.php:44"}},"level":500,"level_name":"CRITICAL","channel":"request","datetime":"2025-11-16T21:00:13.914366+01:00","extra":{}}

So, I followed the documentation instructions: https://github.com/thephpleague/oauth2-server-bundle/blob/44272ff229da25305d4f5612546851bbcaa72d9a/docs/index.md?plain=1#L149

(Related PR: thephpleague/oauth2-server-bundle#200)


I tested it.. And this PR fixes the issue I was having on my kbin.melroy.org with Interstellar and an expired login session I guess.

This will maybe also fix the session issues with people that are getting logged-out?

@melroy89 melroy89 added this to the v1.9.0 milestone Nov 16, 2025
@melroy89 melroy89 added bug Something isn't working high priority critical issue or PR that impacts production api API related issues and pull requests labels Nov 16, 2025
@melroy89 melroy89 enabled auto-merge (squash) November 16, 2025 20:10
@melroy89

This comment was marked as outdated.

@BentiGorlich
Copy link
Member

I don't know if we need that, but since they are recommending it, we should probably add it

@melroy89 melroy89 disabled auto-merge November 16, 2025 21:26
@melroy89
Copy link
Member Author

melroy89 commented Nov 16, 2025

I don't know if we need that, but since they are recommending it, we should probably add it

I did some more digging. But I believe this option is deprecated. See symfony/symfony#47890

Oauth2 server bundle should update their docs. Upstream PR: thephpleague/oauth2-server-bundle#261

@melroy89 melroy89 enabled auto-merge (squash) November 16, 2025 21:29
@melroy89 melroy89 merged commit 0552b50 into main Nov 16, 2025
8 checks passed
@melroy89 melroy89 deleted the fix_logged_in_user_required_to_resolve_auth_request branch November 16, 2025 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api API related issues and pull requests bug Something isn't working high priority critical issue or PR that impacts production

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants