panva / openid-client

OAuth 2 / OpenID Connect Client API for JavaScript Runtimes
MIT License
1.83k stars 392 forks source link

Separate redirect URL from discovery URL #266

Closed cnoelle closed 4 years ago

cnoelle commented 4 years ago

Trying to use the library for authentication (Auth flow with PKCE) with passport in a docker-compose setup. The identity provider in this case is reachable from the NodeJS server via a docker-internal host name, such as http://keycloak:8080, whereas the browser reaches the identity provider via http://localhost:8080. The issuer discovery is successful at http://keycloak:8080, but when a user tries to login in the browser he is redirected to the same URL, which cannot be resolved by the browser. It would hence be necessary to use a different redirect URL for the user. I could not find a way to do this in the documentation, is it possible?

panva commented 4 years ago

I thought this was open under a different repo so i've deleted my previous answers based on that wrong assumption.

panva commented 4 years ago

No, such thing isn't possible with discovery.