Skip to content

Commit cde36fc

Browse files
committed
Helpful additions to the OAuth page
1 parent 2898bff commit cde36fc

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

cls/SourceControl/Git/Utils.cls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1880,6 +1880,7 @@ ClassMethod RunGitCommandWithInput(command As %String, inFile As %String = "", O
18801880
if ((token = "") || (token = "key does not exist")) {
18811881
set errStream = ##class(%Stream.FileCharacter).%New()
18821882
do errStream.Write("Error: Please authenticate your https connection before attempting to use git")
1883+
set errStream.RemoveOnClose = 1
18831884
return 128
18841885
}
18851886
// Need to use token

csp/oauth2.csp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ body {
140140
<li>For GitLab: Go to <a href="https://gitlab.com/-/profile/applications" target="_blank">GitLab Applications</a> and create a new application.</li>
141141
</ul>
142142
<p>Once generated, enter your Client ID and Client Secret below:</p>
143+
<p> The "Authorization callback URL" should be: <b><span id="callbackURL">text</span></b></p>
143144
</div>
144145
<input type="hidden" name="oauthsettings" value="1" />
145146
<div class="form-group row mb-3">
@@ -209,7 +210,7 @@ body {
209210
e.stopPropagation();
210211
var form = document.getElementById('oauthForm');
211212
var redirectURL = document.getElementById('redirectURL')
212-
redirectURL.value = window.location.href
213+
redirectURL.value = window.location.href;
213214
form.submit();
214215
}
215216

@@ -233,6 +234,9 @@ body {
233234
top.opener = window.self;
234235
top.close();
235236
}
237+
238+
var redirectURL = document.getElementById('callbackURL');
239+
redirectURL.innerText = window.location.href.split("?")[0].replace("http:/","https:/");
236240
</script>
237241
</body>
238242
</html>

docs/https.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ If you have not already done so, create a new OAuth app in github or gitlab. The
1313
Remember to save the ClientID and ClientSecret. Once this is finished, you can enter your information into the authentication page.
1414
![Screenshot of authentication page](/images/auth.png)
1515

16-
Once all of the information is correct, you can press Save. This will redirect you to either gitlab or github in order to authorize the application to interact with this. After this is done, you will be redirected back to the authentication page, and you should be good to go!
16+
Once all of the information is correct, you can press Save. This will redirect you to either gitlab or github in order to authorize your application. After this is done, you will be redirected back to the authentication page, and you should be good to go!
1717

1818

0 commit comments

Comments
 (0)