Matt Raible
Are you saying that npm start
solves the problem and yarn start
doesn’t work? If so, that doesn’t surprise me. We’ve seen a lot of issues with Yarn on the JHipster project and are moving back to npm because of it.
Matt Raible
Are you saying that npm start
solves the problem and yarn start
doesn’t work? If so, that doesn’t surprise me. We’ve seen a lot of issues with Yarn on the JHipster project and are moving back to npm because of it.
Simon Bradley
No I’m still getting the same issue, it’s just with npm start I actually get taken to the Okta login page. I still get redirected to the private page after, and an unable to log out.
Matt Raible
I’ve figured out the cause of the problem, but I haven’t figured out a great solution. It’s caused by the cache-first service worker in React. If you’re using Chrome, you can workaround it by going to Developer Tools > Application > Service Workers and check Bypass for network.
This isn’t a good solution because users of your app will need to do this.
Two options for resolution that I’ve found (so far):
1. Disable PWA support in your app by removing registerServiceWorker()
from client/src/index.js
2. Eject the webpack configuration and configure /private
to be a network-first URL
Matt Raible
Hello Lirui: I’ve figured out the problem. See http://disq.us/p/1vmmu11 for workarounds.
Jeetendra sahu
if (referrer != null) {
request.getSession().setAttribute(“SPRING_SECURITY_SAVED_REQUEST”, new SimpleSavedRequest(referrer));
}
in this line i got an error that, new SimpleSavedRequest Class is not present inside the package so please help me.
How to fix it ???
Matt Raible
Make sure you’re using Spring Boot 2.1 M1 (which includes Spring Security 5.1 M2). If you are, you might want to compare your code to the example on GitHub.
soulshunter83
Hi Matt, can you describe it? I’ve the same trouble with chrome, and i’d like to resolve it
Matt Raible
I would just do step #1 above: remove registerServiceWorker()
from client/src/index.js
. To say it another way, remove this line.
soulshunter83
Thanks to reply. It’s something wrong, because following your guide i haven’t this line in my code, just
serviceWorker.unregister();
Matt Raible
Hmmm, maybe you’re using a newer version of Create React App than I did? You can always just build and run the example.
muhammed
About the professional use of reacts js and angular js ?. when developing the application.angular and react part.should it be in the project or in the form of a separate client project.
Matt Raible
I think it depends on your preference. Some like to package their apps inside there Spring Boot apps, and others don’t. The advantage of packaging your app inside Spring Boot when using OIDC is you can use authorization code flow rather than implicit flow, making it more secure.
A few months back, I asked my followers which deployment model they prefer. 65% said they prefer to keep them separate.
Matt Raible
I updated this post yesterday and this is no longer an issue.
Matt Raible
I updated this post yesterday to use Spring Boot 2.1 and I didn’t have any problems importing SimpleSavedRequest
.
charfedine
Hey !
I’m having a problem with initializer.java class ! even after turning on annotation processing and installing the Lombok plugin still have problem with .builder() and .setEvenets() ! any solution please ?
Matt Raible
Does it work from the command line (with Maven)? If so, then it’s probably your IDE setup. I’d recommend checking out Lombok’s documentation to fix this. They have instructions for Eclipse, IntelliJ IDEA, and NetBeans (+ others).
charfedine
yes from the maven command line it worked perfect ! but i encountered another problem when i excute the yarn start command
Matt Raible
That usually happens when the backend API isn’t running. I’d check your browser’s console and see what the error is.
charfedine
isn’t because of my server ? every time i start it i get this error https://uploads.disquscdn.c…
Matt Raible
That’s a Tomcat error, not a Spring Boot error. You probably need to stop Tomcat before running the Spring Boot API.