Closed rasa2k closed 1 year ago
Hi just publish a fix @rasa2k , very sorry for the problem !
checkou the version 6.22.7
I'm still having the same issue after update the package to 6.22.7:
{
"name": "@axa-fr/react-oidc",
"version": "6.22.7",
"private": false,
"main": "dist/index.js",
"jsnext:main": "dist/index.js",
"types": "dist/index.d.ts",
"description": "OpenID Connect & OAuth authentication using react",
"repository": {
"type": "git",
"url": "https://github.com/AxaGuilDEv/react-oidc.git"
},
I don't see any change in the commit referring the issue file OidcProvider.d.ts.
Property 'fetch' is missing in type '{ children: Element; configuration: { client_id: string; redirect_uri: string; scope: string; authority: string; service_worker_relative_url: string; service_worker_only: boolean; }; }' but required in type 'OidcProviderProps'.ts(2741)
OidcProvider.d.ts(24, 5): 'fetch' is declared here.
export declare type OidcProviderProps = {
callbackSuccessComponent?: ComponentType<any>;
sessionLostComponent?: ComponentType<any>;
authenticatingComponent?: ComponentType<any>;
authenticatingErrorComponent?: ComponentType<any>;
loadingComponent?: ComponentType<any>;
serviceWorkerNotSupportedComponent?: ComponentType<any>;
configurationName?: string;
configuration?: OidcConfiguration;
children: any;
onSessionLost?: () => void;
onLogoutFromAnotherTab?: () => void;
onLogoutFromSameTab?: () => void;
withCustomHistory?: () => CustomHistory;
onEvent?: (configuration: string, name: string, data: any) => void;
fetch: Fetch;
};
should be?... fetch?: Fetch;
Oh very sorry @dlaraf , i fix it and test in 2 hours.
Thanks for quick response. It's still not fixed in v.6.22.9 :/
hi @dlaraf , All demos works with lastest excet the nextjs one. Are you using nextJS?
No I'm using React v.18.2.0
Im having the same issue. Im on react 18.2.0 too:
TS2741: Property 'getFetch' is missing in type '{ children: Element; configuration: OidcConfiguration; }' but required in type 'OidcProviderProps'.
91 | <ApplicationCanvas />
92 | ) : (
> 93 | <OidcProvider configuration={configuration}>
Oh, i just understood, i fix it rigth now thank you @dlaraf
6.22.16 fixed this problem for me: https://github.com/AxaFrance/react-oidc/releases/tag/v6.22.16
Hi @NicerDicerPro , thank you very much for the feedback. Very sorry for the issue.
@guillaume-chervet we thank you for the quick response and fix of the problem. Keep up the good work!
6.22.16 fixed this problem for me too. Thanks! Have a great weekend!
Hi,
I'm getting this error on latest version. Using React and Typescript. Shouldn't the property 'fetch' be optional? I can't find any documentation on this 'fetch' props in any of your examples.
Property 'fetch' is missing in type '{ children: Element; configuration: { client_id: string; authority: string; redirect_uri: string; silent_redirect_uri: string; scope: string; service_worker_relative_url: string; service_worker_only: boolean; }; loadingComponent: () => Element; authenticatingErrorComponent: () => Element; authenticatingComponent: ()...' but required in type 'OidcProviderProps'.ts(2741)