I am using angular oidc client library to implement login using sts (ping federate).
The angular sample app has home page. The home page has a link for "protected" page. The requirement is : If I click on the link "protected" , it should take me to the sts provider, once I login to sts successfully, the "protected" page should display. If the login fails, I should get "unauthorized" error
Step 1 - local environment
The settings I am using are as follows
authority :
client_secret:
redirect_uri: 'https://localhost:4200/auth-callback'
The angular app has route defined for "/auth-callback" in app.routing.module
When I test the app locally, it works properly. If I click on the link "protected", I get the login page from the sts and once I login , the page "protected" is displayed, as expected.
Step 2 - AWS / EC2
I used ng build command and deployed the files to ec2 instance on AWS, which has apache installed. The angular app is deployed to /var/www/html
I have ALB defined with domain and the target group pointing to ec2 instance. The app url for this setup is 'https://dev2.abcapp.myorg.com'
When I access the app in browser using the app url, home page is displayed in my browser. When I click on the protected page, it redirects to sts. Then I login to sts, but the callback page fails with not found error.
authority :
client_secret:
redirect_uri: 'https://dev2.abcapp.myorg.com/auth-callback'
Since the STS is sending the response to ec2 apache server instead of client browser, this seems to occur. How do I resolve this issue ?