Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to retrieve access_token using public client #1109

Closed
garrettjoecox opened this issue Nov 6, 2019 · 1 comment
Closed

Unable to retrieve access_token using public client #1109

garrettjoecox opened this issue Nov 6, 2019 · 1 comment

Comments

@garrettjoecox
Copy link

garrettjoecox commented Nov 6, 2019

  • Passport Version: 8.0.0
  • Laravel Version: 6.5.0
  • PHP Version: 7.3.9
  • Database Driver & Version: Sqlite

Description:

I am unable to retrieve an access token using a public client, using the changes merged in #1065

Steps To Reproduce:

  • Create a new laravel project
  • Install laravel/ui auth scaffolding
  • Install passport
  • Walk through frontend quickstart in the laravel/passport docs
  • Authenticate, and create a new OAuth Client unchecking the confidential box
  • Attempt to retrieve an access token hitting the endpoint /oauth/token without providing a secret.

Example payload:

{
    "grant_type": "password",
    "client_id": 3,
    "username": "username",
    "password": "password",
    "scope": "*"
}

Response:

{
    "error": "invalid_client",
    "error_description": "Client authentication failed",
    "message": "Client authentication failed"
}

Note: attempting to send that same payload but using the Laravel Password Grant Client client ID and secret generated on setup the endpoint successfully returns an access token (as intended)

@garrettjoecox garrettjoecox changed the title Public clients not working. Unable to retrieve access_token using public client Nov 6, 2019
@garrettjoecox
Copy link
Author

Actually, I seem to have misunderstood PKCE, as it seems it is only viable for the authorization_code grant type. Disregard.

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

No branches or pull requests

1 participant