AxaFrance / oidc-client

Light, Secure, Pure Javascript OIDC (Open ID Connect) Client. We provide also a REACT wrapper (compatible NextJS, etc.).
MIT License
571 stars 152 forks source link

authorization endpoint - response_mode parameter #1328

Closed kramer99 closed 3 months ago

kramer99 commented 3 months ago

Hi, how can I set the response_mode parameter to query for the /authorization endpoint call?

(See: https://openid.net/specs/oauth-v2-multiple-response-types-1_0.html#ResponseModes)

I didn't see an option to configure this in the configuration object on this page: https://github.com/AxaFrance/oidc-client/tree/main/packages/react-oidc

Thank you.

guillaume-chervet commented 3 months ago

Hi @kramer99 thank you for your issue. I am not sure it is implemented, i will read it more in détail tomorrow.

guillaume-chervet commented 3 months ago

Hi @kramer99 , i think you can already do that by using extras parameters.

With {response_mode:query} I am from my mobile i will give you à better answer when i will be front of a computer.

Bessonov commented 3 months ago

Yes, you can set it through extras:

extras: {
    response_mode: 'query',
},

However, according to the spec, your auth provider should use it by default for the response_type=code:

For purposes of this specification, the default Response Mode for the OAuth 2.0 code Response Type is the query encoding.

kramer99 commented 3 months ago

Thank you both. I'll close this now.