Closed dimaslv closed 8 years ago
@dimaslv actually we registered a GitHub application with https://localhost:8443/auth/github as OAuth redirect URI, i.e. it should work.
Obviously you can register your own GitHub OAuth app with different redirect URI.
Sorry, I have make mistake in problem description. I have set up zmon on remote server and when I connected to it by ip (https://IP:8443/) I got redirected to localhost.
@dimaslv I just tested it in Vagrant box, works :smile:
You have cloned zmon, run vagrant up, pointed your browser to server ip (not localhost) and have not been redirected to https://localhost:8443/?error=redirect_uri_mismatch&error_description=The+redirect_uri+MUST+match+the+registered+callback+URL+for+this+application.&error_uri=https%3A%2F%2Fdeveloper.github.com%2Fv3%2Foauth%2F%23redirect-uri-mismatch&state=16103fa3-2e01-4d6c-9037-69347e279e7a? Maybe you have authenticated before? Can you try to logout?
@dimaslv I pointed my browser to https://localhost:8443/ --- only this will work (as the redirect URI is configured in GitHub with "localhost", see screenshot)
How to change it? Provide new credentials in zmon-controller/zmon-controller-app/src/main/resources/config/application-github.yml and recompile?
@dimaslv you can overwrite all settings (including OAuth client credentials) with environment variables.
You can find an example in our bootstrap script for https://demo.zmon.io : https://github.com/zalando/zmon-demo/blob/master/bootstrap/bootstrap.sh#L121
Is there any way to change url from localhost to something else? I'm trying to start zmon with vagrant. When I connect to the https://localhost:8443/ browser get redirected to https://localhost:8443/?error=redirect_uri_mismatch&error_description=The+redirect_uri+MUST+match+the+registered+callback+URL+for+this+application.&error_uri=https%3A%2F%2Fdeveloper.github.com%2Fv3%2Foauth%2F%23redirect-uri-mismatch&state=16103fa3-2e01-4d6c-9037-69347e279e7a which of course is not working.