Skip to content

Commit

Permalink
default OAuth redirect URI to http://127.0.0.1 (#1444)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjcheetham committed Oct 24, 2023
2 parents 6e06153 + ee35d7b commit e549586
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/generic-oauth.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ following values in your Git configuration:

- Client ID
- Client Secret (optional)
- Redirect URL
- Redirect URL (optional, defaults to `http://127.0.0.1`)
- Scopes (optional)
- OAuth Endpoints
- Authorization Endpoint
Expand Down
4 changes: 1 addition & 3 deletions src/shared/Core/GenericOAuthConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@ public static bool TryGet(ITrace trace, ISettings settings, InputArguments input

if (config.RedirectUri == null)
{
trace.WriteLine($"Invalid OAuth configuration - missing/invalid redirect URI: {redirectUrl}");
config = null;
return false;
config.RedirectUri = new Uri("http://127.0.0.1");
}

if (settings.TryGetSetting(
Expand Down

0 comments on commit e549586

Please sign in to comment.