AuthProvider should support every config available on UserManager
mancioshell opened this issue · 2 comments
mancioshell commented
AuthProvider should support every config available on UserManager.
Currently it seems support only :
authority,
clientId,
clientSecret,
redirectUri,
silentRedirectUri,
postLogoutRedirectUri,
responseType,
scope,
automaticSilentRenew,
loadUserInfo,
popupWindowFeatures,
popupRedirectUri,
popupWindowTarget
In initUserManager, you have destructured settings object omitting lot of config properties such as metadata
or extraQueryParams
which should be support as in oidc-client library.
miestr commented
Is this going to be merged? We also need this.
simenandre commented
Hi, sorry for the super late reply!
Thank you so much for reporting and using this library. 🙏
You can use all config arguments from oidc-client
, you just have to assert your own UserManager
.
See the 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>
);
We are probably going to research ways to improve all this when we eventually land #652