Add support for new configs available on UserManager
VysockyStan opened this issue · 5 comments
Hello,
oidc-client library added this one
- client_authentication [1.11.0] (default: client_secret_post): Indicates when sending client secret if sent as a post param or in Authorization header using HTTP Basic (use client_secret_basic).
And I really need it in my current project.
Could you please add it to the UserManager config
Hey! Thanks for reporting this, and thanks for using oidc-react
!
You can use your own UserManager for this, let me give you an example:
import React from 'react';
import { UserManager, AuthProvider } from 'oidc-react';
const userManager = new UserManager({
// ... set your config here
});
export const HelloComponent: React.FC = () => (
<AuthProvider userManager={userManager}>
{/* ... */}
</AuthProvider>
);
Let me know if that works for you!
Thanks for reply
Yeh, I've tried that but UserManager doesn't have definition for that exact prop.
OidcClient neither has
This causes TS error
new UserManager({ client_authentication: 'client_secret_basic' })
And this
new UserManager({ clientAuthentication: 'client_secret_basic' })
Hello, could you please inform me if you are going to add that prop or not.
Thanks
This would be something I'd normally recommend you open an issue over at oidc-client-js
, since this is not really something wrong with this particular library. However, as we are tracking in #652, the library is deprecated. We are trying to work out which path to go, but until then I'd recommend you do type-casting when using Typescript.
E.g. like this: new UserManager({ clientAuthentication: 'client_secret_basic' } as any)
Thank you very much!
That works