DEV Community

Discussion on: The Best Security for Single Page Applications(SPA) - OpenID Connect OAuth 2.0 Authorization Code PKCE Flow

Collapse
 
vikashkodati profile image
Vikash Kodati

Nice article Kiran. Suppose PKCE flow is not supported by my home grown IDP, what are the options to securely store the clientsecret? Because my IDP only support OIDC Authcode flow which also needs clientsecret to be passed along

Collapse
 
kdhttps profile image
Kiran Mali

Hello vikash,

Thank you but as far as my knowledge there is no way. You have to use PKCE flow for frontend. As your IDP is not support PKCE that means you have to go with implicit flow and compromise with security.

And sorry for late reply.

Collapse
 
bolilla profile image
Borja Roux

Hi. The client secret will not be a secret, but you can still use it in your home grown IDP. Just be aware it won't provide additional security.

If you don't implement PKCE, you can use either the 'state' OAuth parameter or the 'nonce' OIDC parameter (as discussed here datatracker.ietf.org/doc/html/draf...) for protection against CSRF. It is not the same, but it will improve your security.