Using Okta with Angular Skip to main content
https://support.okta.com/help/answers?id=9062a000000xa3bqac&refurl=http%3a%2f%2fsupport.okta.com%2fhelp%2fanswers
How satisfied are you with the Okta Help Center?
Thank you for your feedback!
How satisfied are you with the Okta Help Center?
1
2
3
4
5
Very Dissatisfied
Very satisfied
Enter content less than 200 characters.
Ask Search:
Mark RitchieMark Ritchie 

Using Okta with Angular

After reading the article https://developer.okta.com/blog/2017/04/17/angular-authentication-with-oidc#create-open-id-connect-app I downloaded the source from https://github.com/oktadeveloper/okta-angular-openid-connect-example and changed the following values to my regisered app, where the ???? had the correct values.

this.oauthService.clientId = '??????';
this.oauthService.issuer = 'https://dev-6????9.oktapreview.com';

When I tried to initiate the implicit flow I get a "No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:4200' is therefore not allowed access."

This looks like a CORS problem but I'm not sure how to resolve it here so I can perfrom the initial login
Matt MaherMatt Maher (Okta, Inc.)
Hi Mark,
I think it would be best if you opened a Support Ticket with us regarding this issue. We will need to gather more specific details about your setup and a private support ticket is the best approach. Let me know if you have any other questions.