Closed emreucmaZ closed 2 years ago
Hi @MadeByForeV, thank you very much for the issue, your problem seem that your oidc server https://localhost:44333/ does seems to be reacheable.
what do you have in your network panel error?
does it work with:
client_id: 'interactive.public', authority: 'https://demo.duendesoftware.com',
?
I can reproduce the error with a nextjs starter.
I will add a full code sample as soon as i can.
hi @MadeByForeV , I have added a working demo here https://github.com/AxaGuilDEv/react-oidc/pull/804
Thanks, i set wrong client_id to my configuration.
i get an error :(
my identity server
my configuration inside _app.js
const configuration = {
client_id: "LoginExample_App",
redirect_uri: "http://localhost:3000",
scope: "openid profile email api offline_access",
authority: "https://localhost:44333/",
service_worker_relative_url: "/OidcServiceWorker.js",
service_worker_only: true,
};
i get loading text then i receive an error
hi @MadeByForeV ,
There is a bug I need to debug ^^
You can as a workaround set "authority_configuration" information inside your configuration
const configuration = {
client_id: 'interactive.public.short',
redirect_uri: 'http://localhost:3001/#authentication/callback',
silent_redirect_uri: 'http://localhost:3001/#authentication/silent-callback', // Optional activate silent-signin that use cookies between OIDC server and client javascript to restore the session
scope: 'openid profile email api offline_access',
authority: 'https://demo.identityserver.io',
authority_configuration: {
authorization_endpoint: 'https://demo.duendesoftware.com/connect/authorize',
token_endpoint: 'https://demo.duendesoftware.com/connect/token',
userinfo_endpoint: 'https://demo.duendesoftware.com/connect/userinfo',
end_session_endpoint: 'https://demo.duendesoftware.com/connect/endsession',
revocation_endpoint: 'https://demo.duendesoftware.com/connect/revocation',
},
};
as in the demo https://github.com/AxaGuilDEv/react-oidc/issues/802
you will find these information inside.
https://demo.duendesoftware.com/.well-known/openid-configuration
https:/youroidcserver/.well-known/openid-configuration
Hi @MadeByForeV ,
I think the fetch problem is fixed in the last alpha version. if you want you can make a try : https://black-rock-0dc6b0d03-817.westeurope.1.azurestaticapps.net/
Published under version 6.0.0-alpha0 The breaking change is that it require a new silent_signin_uri property and the silent_redirect_uri need to be declared to OIDC server.
Here a quick migration guide : https://github.com/AxaGuilDEv/react-oidc/blob/295776fbfeabde78f6d39ae5326f3a7da5050a11/MIGRATION_GUIDE_V5_TO_V6.md
Hi @MadeByForeV , everything is working fine now in v6. May we close the issue?
Hi @MadeByForeV, i think everything is OK now, i close the issue feel free to reopen it if needed. Thank you very much for this issue.
Issue and Steps to Reproduce
I have to use react-oidc in next.js but i get error TypeError: Failed to fetch
Versions
Screenshots
My _app.js
My OidcTrustedDomains.js in /public
My package.json
Extra
i trying this on next.js app and abp.io backend i had added cors to my backend