Skip to content

Invalid Client #50

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

Closed
ronykrell opened this issue Jun 8, 2019 · 2 comments
Closed

Invalid Client #50

ronykrell opened this issue Jun 8, 2019 · 2 comments

Comments

@ronykrell
Copy link

ronykrell commented Jun 8, 2019

Hi, following tutorial and receiving an invalid client message. Using the format as suggested:
$ curl -u ${client_id}:${client_secret} -XPOST http://127.0.0.1:5000/oauth/token -F grant_type=password -F username=${username} -F password=valid -F scope=profile

*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 5000 (#0)
* Server auth using Basic with user ''
> POST /oauth/token HTTP/1.1
> Host: 127.0.0.1:5000
> Authorization: Basic Og==
> User-Agent: curl/7.54.0
> Accept: */*
> Content-Length: 453
> Expect: 100-continue
> Content-Type: multipart/form-data; boundary=------------------------329be3b09d236e51
> 
< HTTP/1.1 100 Continue
* HTTP 1.0, assume close after body
< HTTP/1.0 401 UNAUTHORIZED
< Content-Type: application/json
< Cache-Control: no-store
< Pragma: no-cache
* Authentication problem. Ignoring this.
< WWW-Authenticate: Basic error="invalid_client", error_description=""
< Content-Length: 27
< Server: Werkzeug/0.15.4 Python/3.6.8
< Date: Sat, 08 Jun 2019 00:36:34 GMT
< 
* Closing connection 0
{"error": "invalid_client"}
@ronykrell
Copy link
Author

See #51, was submitting the curl command in an invalid way. Server rightfully didn't recognize a client id surrounded by ${}.

@klamse
Copy link

klamse commented Nov 22, 2021

I have an issue with the example on this page:
https://github.com/authlib/example-oauth2-server

curl -u zdIKyq4ngefIcRtcU83mYK4x:oBxXfYNeqGtBq07UHrmMXLfonxTimxoJ0qpIhV9lQWYtN82Z -XPOST http://127.0.0.1:5000/oauth/token -F grant_type=password -F username=test1 -F password=valid -F scope=profile

Response: {"error": "unauthorized_client"}

There is not enough debug to let me know what the issue is. The username is test1, correct.

From http://127.0.0.1:5000/
(cut. from HTML)
Logged in as test1 (Log Out)
Client Info
client_id: zdIKyq4ngefIcRtcU83mYK4x
client_secret: oBxXfYNeqGtBq07UHrmMXLfonxTimxoJ0qpIhV9lQWYtN82Z
client_id_issued_at: 1637592243
client_secret_expires_at: 0
Client Metadata
client_name: test
client_uri: https:/authlib.org
grant_types: ['authorization_code, password']
redirect_uris: ['https://authlib.org']
response_types: ['code']
scope: profile
token_endpoint_auth_method: client_secret_basic

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

2 participants