Skip to content

OAuth refresh grant returns 500 internal server error  #1533

Open

Description

@NSeydoux

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 #641

Activity

  1. agentydragon commented on Feb 16, 2021

    @agentydragon

    Seeing the same. Also getting a 500 error without Authorization header and with passing client ID and secret in query parameters.

  2. jaxoncreed commented on Feb 25, 2021

    @jaxoncreed
    Contributor

    Well, it looks like it was never implemented: https://github.com/solid/oidc-op/blame/main/src/handlers/TokenRequest.js#L500. The refresh method of AccessToken needs to be created. Though, all the infrastructure that's needed before that seems to be there.

  3. jaxoncreed commented on Feb 25, 2021

    @jaxoncreed
    Contributor

    Okay I've built the feature here: nodeSolidServer/oidc-op#30. Note that this has not been thoroughly tested.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions