abhiram s
Uploaded to https://github.com/abhirams…
Could you please check the code? Thank you
Matt Raible
I believe you have to move all your packages into the ”demo” directory. I don’t think Spring can traverse up the packages like you’re trying to do with ComponentScan.
abhiram s
yeah Matt. It worked! But i couldn’t understand the reason behind earlier package structure. As per my knowledge, it should have worked as scanning is on ‘com.poc’.
Clemens Sietas
Hi Matt,
your Spring Boot Angular Auth example is fantastic. I do understand it know as I searched for hours the same problem as Enrique has. I registered an app in my OktaDev-Account, copied user and cliendId and even creade my own Giphy-API-key. I still get the error above. I tried everything in the cors filter. Nothing works.
Still getting:
Access to XMLHttpRequest at ‘https://dev-<account-no>.okta.com/oauth2/default/.well-known/openid-configuration’ from origin ‘http://localhost:4200’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
I cloned the code from the Github repo. When I stripped of the authorization I got the rest of the application working. Seeing all the cars with giphy images. But reverting back to the full blown app gives me the error.
Do you have any suggestion?
Matt Raible
Can you see if you have http://localhost:4200 configured as a trusted origin on Okta? The setting is under API > Trusted Origins. If you have it there, can you try it with Firefox?
Clemens Sietas
Hi Matt, that was the problem. Thank you! I did not configure API > Trusted Origins. I did not know, being new to Okta. Now I am fine.
The images were not loaded with my Giphy API key so I switched back to the original and the images were loaded and displayed. I try to solve this problem next.
navinika goyal
Happy to found this blog. This is obviously one good post. I appreciate your hard work is a valuable information. Keep blogging. Spring Training in Electronic City
Priya Sharma
Hey, Thank you so much for sharing this informative post with us. Keep sharing.
Swaraj Tractor Price