Open SimonTheLeg opened 1 week ago
Okay I finally figured out how it works. The Authorization header seemed to be the issue. The following works
❯ curl -L -X POST 'http://localhost:8080/dex/token' \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'scope=openid email' \
--data-urlencode 'username=admin@example.com' \
--data-urlencode 'password=password' \
--data-urlencode 'client_id=public-client'
Will create a Docs PR tomorrow :)
Following the guide at https://dexidp.io/docs/connectors/local/, I am running into some issues:
If you copy the example from the
Obtaining a token
section and set it up with sqllite as storage...You will get
Which is a bit unconvenient, but still can be fixed easily by adding the
web.http
section to the config:And then dex starts
However you still will not be able to to run the curl examples from the
Public Client
orPrivate Client
section at the bottom of the documentAt first I thought this was due to the fact that in the config the password is actually set to "password" and not "admin", but still the same issue
I have also tried both variations with 'username=admin', but with the same result.
Can you advise how to get retrieving the token using curl to work? Happy to contribute this back to the guide in addition to the adaptations I made above.