I am trying to set up OpenID Connect IdP-SP pair on a VPS on 2 different subdomains. I successfully managed to make different implementations work on local environment but on the server they don't. I am currently using the certified node.js implementations.
The behavior on the server is the following:
- I click log in on the Service Provider
- I am redirected to the Identity Provider
- I click authorize
- I am redirected properly back to the Service Provider but I am not logged in
There are 2 possible causes I suspect:
the IdP although hosted on https, on it's discovery endpoint (/.well-known/openid-configuration), it sends information about the other endpoints with http prefixed. This causes to switch back and forth between http and https during the authentication process
When I tried PHP implementations I noticed that even though the Service Provided was able to successfully acquire an authorization code, it failed to exchange it at the
I have no idea how to debug this and figure the source of the problem. Any recommended course of action?