-
Notifications
You must be signed in to change notification settings - Fork 162
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
Nextjs support #850
Comments
Hi @geniusit , Thank you for your issue. The library should work with any oidc provider. Which oidc provider do you use? What append if you update scope to : scope: "openid profile offline_access", |
@guillaume-chervet |
Thank you, i will make a test with openam. |
I did not get the time to test today. I will try tomorrow @geniusit , Thank you it will help to make the library better. |
@guillaume-chervet No problem. Thank you too. BTW we are former colleagues ;) I ve worked for AXA too (Wasquehal) |
I am sorry for the delay @geniusit . I am on it as soon as i can. I have a bush month ^^ |
next.js is not made for spa, so i doubt you can use this lib. maybe it will be possible with that: https://nextjs.org/blog/layouts-rfc but not available yet |
Hello, I've tried using react-oidc on NextJS 13 using the Also, with what I tried I have the error: |
@ZeKap Hi, I got it to work with
|
hi @vanquishkuso , I Close the issue. It is compatible nextjs and more now. |
Hi @guillaume-chervet, great to hear. Although it might be off topic, I also had problem with oidc-react preventing the server from initially loading the page (it instead showing a white loading page). I assume this is bad for SEO. Can this be fixed or overwritten in some way? |
Hi @vanquishkuso , yes I will solve this issue. Thank your for your feedback. I reopen the issue to trace it. |
That's great to hear! I have tried to get other packages to work with SSR but I just can't get it to work. Will your fix also work for child components calling useOidc() even though the package hasn't authenticated them (e.g. window hasn't been loaded in the provider or before dynamic urls has been set in the oidc config)? |
hi @vanquishkuso , I have published a first alpha 7.4.0-alpha.1025 I'am off during 3 weeks. |
Hi @guillaume-chervet, great, that was fast! Will give it a test next week. |
Hi again @guillaume-chervet, I tested to convert our app to oidc-react and I ran in to the same issue as before with router.replace: Adding back the workaround which is not optimal (below), I get it to work, but i get window is not defined. |
Thank you @vanquishkuso for the feedback. |
Hi @guillaume-chervet, I tried to reproduce it in codesandbox but couldn't. It may be something with my setup in my original project. What I do have problem with is making it work with dynamic configuration. For us, the urls are stored in a json file locally which has to be fetched. When fetch is complete it updates the configuration state. Rendering null if configuration is not set works fine, but then the whole app gets delayed. Is there a workaround for this? |
I try to use the library in a nextjs application.
I just replace default value with these :
I got this error when accessing localhost:3001 :
I also see that the query params are not sent.
Did I misunderstand something with the library?
Is this library able to work in a context outside of axa?
The text was updated successfully, but these errors were encountered: