Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 33c8e36

Browse files
Fix host selection in AuthenticationView
1 parent 4b2c69c commit 33c8e36

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/AuthenticationView.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ private AuthenticationService AuthenticationService
3434
{
3535
if (authenticationService == null)
3636
{
37-
var host = Repository != null ? Repository.CloneUrl.ToRepositoryUrl() : UriString.ToUriString(HostAddress.GitHubDotComHostAddress.WebUri);
38-
//TODO: Understand why this makes sense
37+
var host = Repository != null
38+
? new UriString(Repository.CloneUrl.ToRepositoryUri().GetComponents(UriComponents.SchemeAndServer, UriFormat.SafeUnescaped))
39+
: UriString.ToUriString(HostAddress.GitHubDotComHostAddress.WebUri);
3940

4041
AuthenticationService = new AuthenticationService(host, new AppConfiguration(), Platform.Keychain);
4142
}

0 commit comments

Comments
 (0)