teranetsrl / oauth2_client

Simple Dart library for interacting with OAuth2 servers.
BSD 2-Clause "Simplified" License
91 stars 111 forks source link

OAuth2Helper not sending custom params on client credentials flow #184

Open softwaresale opened 3 months ago

softwaresale commented 3 months ago

Hello! I am currently using this package to interface with the Auth0 Management API. That flow uses the client credentials flow. Auth0 requires that you send an audience parameter when requesting a flow, but it appears that the following function:

https://github.com/teranetsrl/oauth2_client/blob/36f7e70b894ed65d6cfa052c508979f088008e5f/lib/oauth2_helper.dart#L115-L122

does not send the custom parameters provided. Is this intentional? If not, it would be nice if client credentials flow can support custom auth token parameters. I can submit a PR for this feature if I should make the change. Thanks!