
j5v7c (j5v7c) asked a question.
Hello,
I'm trying to implement the guide found here: https://developer.okta.com/quickstart/#/angular/java/spring I got the Angular 2 front-end app implemented and running and working perfectly. Redirects to our Okta preview site, redirects back, all that. Now I'm working on the Java/Spring API backend piece. According to the guide, it's quite simple. Install the Okta dependency, add your configs, add a controller, and you're off and running. However, I have found that I once I install the Okta dependency (I spun up an new Spring Boot Web MVC app), I experience CORS issues. I have implemented CORS in two ways:In the API: https://spring.io/guides/gs/rest-service-cors/In Okta: https://developer.okta.com/docs/api/getting_started/enabling_cors.html However, that still doesn't resolve the CORS issue. After trying every which way under the sun to overcome the CORS issue, I found this solution and implemented it:https://stackoverflow.com/questions/30632200/standalone-spring-oauth2-jwt-authorization-server-cors/30638914#30638914 But, that doesn't "feel" right. I don't think, after doing the two CORS solutions above, I should still be running into any CORS issues. So, after implementing that last CORS solution, I no longer get CORS issues. However, now I get the following error in the front-end console: An I/O error occurred while reading from the JWK Set source: Server returned HTTP response code: 403 for URL: https://{mydomain}.oktapreview.com/oauth2/default/v1/keys Any advice on the CORS issue, or this I/O error issue would be much appreciated. I'm hitting a wall with this. Thanks,Gary