Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AuthProvider should support every config available on UserManager #539

Closed
mancioshell opened this issue Mar 20, 2021 · 2 comments
Closed

Comments

@mancioshell
Copy link
Contributor

mancioshell commented Mar 20, 2021

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
Copy link
Contributor

miestr commented May 20, 2021

Is this going to be merged? We also need this.

@simenandre
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants