Open jdavis-software opened 1 year ago
I just tested this with a fresh CRA and I'm not duplicating the error. I would try restarting the development server. If that doesn't work, try removing the library and reinstalling.
@ryan-sandy yeah I tried both of those last Friday... and again this morning... it has to do with the types in the tsconfig
"types": [
"jest",
"node",
"cypress",
"redux-oidc-2"
],
but that isn't resolving it, take a look at this stackoverflow , I think we need to add a npm i --save-dev @types/redux-oidc-2
or something because typescript isn't picking it up as a module. Any thoughts?
@ryan-sandy actually looking at the declaration model index.d.ts
for your package I think the name is redux-oidc-hooks
not redux-oidc-2
and is causing it to error
declare module "redux-oidc-hooks"
@jdavis-software I just pushed a new version that should have the correct export. Sorry about that. I missed it when I cloned the repo the first time. If it fixes this issue, let me know and I'll close the issue.
@ryan-sandy perfect ty that fixed it but getting this error on the children
of the <CallbackComponent>
@jdavis-software Try v1.1.1 now. I added the props to the export in index.ts.
@ryan-sandy i get the below error now
Only the Authorization Code flow (with PKCE) is supported Call Stack OidcClient.createSigninRequest bundle.js:50800:13 UserManager._signinStart bundle.js:51940:48 UserManager.signinRedirect bundle.js:51707:16
my response_type: "token id_token", in usermamanger
@ryan-sandy perfect looks like its working now! @M1019171 make sure your run this before.
npm remove redux-oidc-2
then re-install
npm i redux-oidc-2@latest
@M1019171 You will also need to install the new userManager
npm remove oidc-client
npm install --save oidc-client-ts
@ryan-sandy running into a import issue, other than that looking at the code it looks good!
Here is the import code
Am I missing something with the configuration of it? I am using CRA just FYI
Here are the packages as well: