Commit 15242a86 authored by rithu leena john's avatar rithu leena john Committed by GitHub

Merge pull request #967 from rithujohn191/err-msg

connector: improve error message for callback URL mismatch
parents 1d7abf89 682d78f5
......@@ -130,7 +130,7 @@ func (c *githubConnector) oauth2Config(scopes connector.Scopes) *oauth2.Config {
func (c *githubConnector) LoginURL(scopes connector.Scopes, callbackURL, state string) (string, error) {
if c.redirectURI != callbackURL {
return "", fmt.Errorf("expected callback URL did not match the URL in the config")
return "", fmt.Errorf("expected callback URL %q did not match the URL in the config %q", callbackURL, c.redirectURI)
}
return c.oauth2Config(scopes).AuthCodeURL(state), nil
......
......@@ -136,7 +136,7 @@ func (c *oidcConnector) Close() error {
func (c *oidcConnector) LoginURL(s connector.Scopes, callbackURL, state string) (string, error) {
if c.redirectURI != callbackURL {
return "", fmt.Errorf("expected callback URL did not match the URL in the config")
return "", fmt.Errorf("expected callback URL %q did not match the URL in the config %q", callbackURL, c.redirectURI)
}
return c.oauth2Config.AuthCodeURL(state), nil
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment