Hi Team,
I have an Angular app (SPA, client) and an ASP.Net API (both hosted on same server but different applications). I am looking to implement token based authentication with OKTA using OpenId connect.
Angular app will redirect to OKTA login page and in return gets the Bearer Token using OpenID from OKTA. This Bearer token will be passed to the ASP.NET API and it should have logic to authenticate the Bearer token passed.
I have registered the SPA and passing client id to OKTA.
My code is not generating bearer token and bearer token received in postman is not getting validated.
Can someone provide working code:
1. To call OKTA from Angular SPA and get Bearer token
2. To validate Bearer token in ASP.NET API (locally or in OKTA)
The snippet provided in samples are not working for me. If someone can provide a working code, it will be helpful.