diff --git a/github-oauth-client.html b/github-oauth-client.html index 1df0a6f7..7609c23e 100644 --- a/github-oauth-client.html +++ b/github-oauth-client.html @@ -12,12 +12,14 @@ } var client_id = getParameter("client_id"); var code = getParameter("code"); - if (code) { - localStorage["githubCode"] = code; - window.close(); - } else if (client_id) { + if (client_id) { window.location.href = "https://github.com/login/oauth/authorize?client_id=" + client_id + "&scope=repo"; + } else { + if (code) { + localStorage["githubCode"] = code; + } + window.close(); } diff --git a/index.html b/index.html index 79caa8de..1fea1e8e 100644 --- a/index.html +++ b/index.html @@ -258,33 +258,25 @@