appsup-dart / openid_client

Library for working with OpenID Connect and implementing clients.
BSD 3-Clause "New" or "Revised" License
90 stars 118 forks source link

Add support for additional parameters #101

Closed twklessor closed 1 year ago

twklessor commented 1 year ago

There are instances where allowing for additional parameters when authenticating is useful. This PR solves this one thing.

rbellens commented 1 year ago

what are those use cases?

twklessor commented 1 year ago

We are using the Authorization Code Grant flow. In our case we need to use an additional paratemeter in the initial URL.

Example; https://c2id.com/login?response_type=code &scope=myapi-read%20myapi-write &client_id=s6BhdRkqt3 &state=af0ifjsldkj &redirect_uri=https%3A%2F%2Fclient.example.org%2Fcb&employment_id=111212424

Notice the employment_id parameter.

I know this is not following the spec exactly but it is useful to have the option to include additional parameters.

kaciula commented 1 year ago

@rbellens We need this also. We need to pass the country because we use SIM-based authentication with electronic ids and each country has a different behavior.