nodeSolidServer / nodeSolidServer/node-solid-server

OAuth refresh grant returns 500 internal server error

Open
#1,533 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.8k
Forks
308
PR merge metrics
No merged PRs in 30d

Description

The openid configuration available at the .well-wknow iri for the NSS identity provider (e.g. https://solid.zwifi.eu/.well-known/openid-configuration) indicates support for the refresh_token grant. However, when issuing a refresh token request that should be valid (see below), the response is Internal Server Error.

curl --location --request POST 'https://solid.zwifi.eu/token' \
--header 'Authorization: Basic <client id:client secret>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=refresh_token' \
--data-urlencode 'refresh_token=<refresh token>'

Steps to reproduce:

  • Get a client ID, secret and a refresh token. That may be done by inspecting the dynamic registration of a client when logging in with an app for instance.
  • Use the credentials to fill in the request above (client ID and secret should be base64-encoded)

Expected result

A 200 response with a JSON object in the body containing a new, valid access token.

Observed result

An internal error

Should this issue be reported here in the NSS repo, or in https://github.com/solid/oidc-auth-manager ?

NB: This is kind of related to https://github.com/solid/node-solid-server/issues/641

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the /token endpoint and trace how the refresh_token grant is handled in this repository, using the supplied curl request against the OpenID configuration example. Compare the behavior with the related issue and the oidc-auth-manager repository; done means a valid request returns HTTP 200 with a new access token JSON object instead of an internal error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
api, authentication, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.