thephpleague / oauth2-server

A spec compliant, secure by default PHP OAuth 2.0 Server
https://oauth2.thephpleague.com
MIT License
6.49k stars 1.12k forks source link

Configuring client_id and client_secret #1364

Closed damc closed 11 months ago

damc commented 11 months ago

Hello,

I'm currently integrating league/oauth2-server with Symfony and have encountered an issue where I'm unsure about how to configure the client_id and client_secret for OAuth clients. I've browsed the documentation, but couldn't find a clear section or example that explains this.

Specifically, I'm facing the following error when trying to authenticate:

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

While I understand this typically indicates a missing or incorrect client configuration, I'm unsure about where and how to set this up in the context of league/oauth2-server and its integration with Symfony.

Could you please provide guidance or enhance the documentation to clarify the following:

  1. How and where to register and configure OAuth clients with their client_id and client_secret.
  2. Any Symfony-specific configurations or steps that need to be taken to ensure smooth integration.

Thank you for your assistance and for the great work on this library!

Sephster commented 11 months ago

There is a Symfony specific implementation of this server which might be easier for you to implement. It can be found at https://github.com/thephpleague/oauth2-server-bundle/. If you are already using this I think it would be best to raise the issue there. If you have to use the default server, let me know and I will try to give you more specific pointers.

damc commented 11 months ago

I have resolved the issue. I'm using Symfony integration. There is a Symfony command in that bundle for creating new client.