Skip to content

Conversation

@ylebre
Copy link
Member

@ylebre ylebre commented Jun 23, 2025

This PR is meant to fix #204

Work so far:

  • split up the handling for authorization_code and refresh_token, so that we don't have 500 error anymore. This requires an update on the php-solid-auth code as well to get the refresh token information.

The current result is that the 500 error is solved, but replaced with a 401 instead. This one is coming from deeper in the token handling.

@ylebre ylebre marked this pull request as draft June 23, 2025 14:19
@ylebre
Copy link
Member Author

ylebre commented Jun 23, 2025

The refresh token that is generated is actually an encoded json object, containing something like this:

{"client_id":"005c86034d936550c670c31da13fabcd","refresh_token_id":"09e9024478f33a713b707f198cacea66640df347a43f34ea1e42a30314c643f6b5cb31a91421bf43","access_token_id":"7556a6f81ab4e0d2fee33904804954459abf8ee6dc1aa20888adb6fdd0e92e8389a10d69c7aea166","scopes":["openid"],"user_id":"https:\\/\\/nextcloud.local\\/apps\\/solid\\/~alice\\/profile\\/card#me","expire_time":1753279371},

@ylebre ylebre marked this pull request as ready for review June 25, 2025 20:44
@ylebre
Copy link
Member Author

ylebre commented Jun 25, 2025

Ok - it turned out the configuration passed to the oauth server was missing the client ID because it was in the POST instead of in the GET. After changing that around, it looks to be working now.

@ylebre ylebre changed the title WIP: handle token request cases for authorization_code and refresh_token dfferently handle token request cases for authorization_code and refresh_token differently Jun 25, 2025
@Potherca
Copy link
Member

Potherca commented Jun 26, 2025

I've added the PHP Codesniffer config as discussed in the comments.

@ylebre ylebre requested a review from Potherca June 27, 2025 15:10
@Potherca Potherca merged commit 4fc7618 into main Jun 27, 2025
66 of 72 checks passed
@Potherca Potherca deleted the fix/refreshToken branch June 27, 2025 15:14
@Potherca Potherca added this to the v0.11.0 milestone Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refresh token request results in 500 Internal Server Error

3 participants