Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Client Credentials broken in 5.0.0-rc.1 #217

Closed
Labels
bug 🐛Something isn't working bug resolved 😃Bug has been resolved and fixed.
@shrihari-prakash

Description

Specify your setup

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior:

  1. In the token endpoint, supply grant type as client_credentials.
  2. Pass the access token from the previous step to a route that uses OAuthServer.server.authenticate.
  3. Result will be invalid_token: Invalid token: access token is invalid.

Alternatively, please add a link to a GitHub repo
that reproduces the error/s.

It is possible to do a quick check in a dev deployment of my project: https://liquid-pe2r.onrender.com (It is very slow on the first request, so give it a minute to load, and then do the API call).

  1. Send request to https://liquid-pe2r.onrender.com/oauth/token
  2. Sample client-credentials: client_id: application_client, client_secret: super-secure-client-secret
  3. Scope: system.client.all
  4. Now try to access http://localhost:2000/system/client-api/stats (Which can be accessed only by clients).

You should see an unauthorized.

Expected behavior

The server should accept the valid token.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

The problem seems to be due to a different token passed to getAccessToken function in the model than the one that was returned by authorize function..

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Something isn't working bug resolved 😃Bug has been resolved and fixed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /