Skip to content

Commit 5a83f93

Browse files
committed
remove client secret
1 parent bb44d57 commit 5a83f93

File tree

3 files changed

+18
-14
lines changed

3 files changed

+18
-14
lines changed

options/options.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ <h2>Logged in as: <a target="_blank" id="login-user">XXX</a></h2>
2222
<b>repo</b> and <b>gist</b>
2323
scope):</p>
2424
<input id="accesstoken" type="password" placeholder="github access token" />
25-
<p class="label"><a target="_blank"
25+
<!-- <p class="label"><a target="_blank"
2626
href="https://accounts.google.com/o/oauth2/v2/auth?response_type=code&client_id=971735641612-am059p55sofdp30p2t4djecn72l6kmpf.apps.googleusercontent.com&redirect_uri=urn:ietf:wg:oauth:2.0:oob&scope=https://www.googleapis.com/auth/script.projects&access_type=offline">
2727
Grant Google oauth token</a> (paste the result code here)
2828
<br>*or leave it empty to use Chrome login user(for <b>Chrome</b> only)</p>
29-
<input id="api-key" type="password" placeholder="google oauth token" />
29+
<input id="api-key" type="password" placeholder="google oauth token" /> -->
3030
</div>
3131
<div class="login-item login-item-otp">
3232
<input id="otp" type="text" placeholder="authentication code">
@@ -45,11 +45,11 @@ <h2>Logged in as: <a target="_blank" id="login-user">XXX</a></h2>
4545
<input id="ghe-password" type="password" placeholder="password" />
4646
<p class="label">or accessToken(with <b>repo</b> and <b>gist</b> scope):</p>
4747
<input id="ghe-accesstoken" type="password" placeholder="access token" />
48-
<p class="label"><a target="_blank"
48+
<!-- <p class="label"><a target="_blank"
4949
href="https://accounts.google.com/o/oauth2/v2/auth?response_type=code&client_id=971735641612-am059p55sofdp30p2t4djecn72l6kmpf.apps.googleusercontent.com&redirect_uri=urn:ietf:wg:oauth:2.0:oob&scope=https://www.googleapis.com/auth/script.projects&access_type=offline">
5050
Grant Google oauth key</a> (paste the result code here)
5151
<br>*or leave it empty to use Chrome login user(for <b>Chrome</b> only)</p>
52-
<input id="ghe-api-key" type="password" placeholder="google oauth token" />
52+
<input id="ghe-api-key" type="password" placeholder="google oauth token" /> -->
5353
</div>
5454
<div class="login-item login-item-otp">
5555
<input id="ghe-otp" type="text" placeholder="authentication code">
@@ -67,11 +67,11 @@ <h2>Logged in as: <a target="_blank" id="login-user">XXX</a></h2>
6767
<div class="login-item login-item-basic">
6868
<input id="bitbucket-email" type="email" placeholder="email" />
6969
<input id="bitbucket-password" type="password" placeholder="password" />
70-
<p class="label"><a target="_blank"
70+
<!-- <p class="label"><a target="_blank"
7171
href="https://accounts.google.com/o/oauth2/v2/auth?response_type=code&client_id=971735641612-am059p55sofdp30p2t4djecn72l6kmpf.apps.googleusercontent.com&redirect_uri=urn:ietf:wg:oauth:2.0:oob&scope=https://www.googleapis.com/auth/script.projects&access_type=offline">
7272
Grant Google oauth token</a> (paste the result code here)
7373
<br>*or leave it empty to use Chrome login user(for <b>Chrome</b> only)</p>
74-
<input id="bitbucket-api-key" type="password" placeholder="google oauth token" />
74+
<input id="bitbucket-api-key" type="password" placeholder="google oauth token" /> -->
7575
</div>
7676
<button id="bitbucket-login">bitbucket login</button>
7777
<p class="message">Please star this extension on <a href="https://github.com/leonhartX/gas-github">Github</a>
@@ -88,11 +88,11 @@ <h2>Logged in as: <a target="_blank" id="login-user">XXX</a></h2>
8888
<input id="gitlab-password" type="password" placeholder="password" />
8989
<p class="label">or personal accessToken(with <b>api</b> scope):</p>
9090
<input id="gitlab-accesstoken" type="password" placeholder="access token" />
91-
<p class="label"><a target="_blank"
91+
<!-- <p class="label"><a target="_blank"
9292
href="https://accounts.google.com/o/oauth2/v2/auth?response_type=code&client_id=971735641612-am059p55sofdp30p2t4djecn72l6kmpf.apps.googleusercontent.com&redirect_uri=urn:ietf:wg:oauth:2.0:oob&scope=https://www.googleapis.com/auth/script.projects&access_type=offline">
9393
Grant Google oauth token</a> (paste the result code here)
9494
<br>*or leave it empty to use Chrome login user(for <b>Chrome</b> only)</p>
95-
<input id="gitlab-api-key" type="password" placeholder="google oauth token" />
95+
<input id="gitlab-api-key" type="password" placeholder="google oauth token" /> -->
9696
</div>
9797
<button id="gitlab-login">gitlab login</button>
9898
<p class="message">Please star this extension on <a href="https://github.com/leonhartX/gas-github">Github</a>

options/options.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ function getGithubParam() {
8686
const scm = 'github';
8787
const username = $('#username').val();
8888
const token = $('#accesstoken').val();
89-
const apiKey = $('#api-key').val();
89+
// const apiKey = $('#api-key').val();
90+
const apiKey = null;
9091
const baseUrl = `https://api.github.com`;
9192
const otp = $('#otp').val();
9293
return {
@@ -104,7 +105,8 @@ function getGHEParam() {
104105
const username = $('#ghe-username').val();
105106
const password = $('#ghe-password').val();
106107
const token = $('#ghe-accesstoken').val();
107-
const apiKey = $('#ghe-api-key').val();
108+
// const apiKey = $('#ghe-api-key').val();
109+
const apiKey = null;
108110
const baseUrl = $('#ghe-url').val() + '/api/v3';
109111
const otp = $('#ghe-otp').val();
110112
return {
@@ -122,7 +124,8 @@ function getBitbucketParam() {
122124
const scm = 'bitbucket';
123125
const username = $('#bitbucket-email').val();
124126
const password = $('#bitbucket-password').val();
125-
const apiKey = $('#bitbucket-api-key').val();
127+
// const apiKey = $('#bitbucket-api-key').val();
128+
const apiKey = null;
126129
const baseUrl = `https://api.bitbucket.org/2.0`;
127130
return {
128131
scm,
@@ -139,7 +142,8 @@ function getGitLabParam() {
139142
const password = $('#gitlab-password').val();
140143
const token = $('#gitlab-accesstoken').val();
141144
const tokenType = (token && token.length > 0) ? 'personalToken' : 'oAuth';
142-
const apiKey = $('#gitlab-api-key').val();
145+
// const apiKey = $('#gitlab-api-key').val();
146+
const apiKey = null;
143147
const baseUrl = ($('#gitlab-url').val() || 'https://gitlab.com') + '/api/v4';
144148
return {
145149
scm,
@@ -164,7 +168,7 @@ function addCred(param) {
164168
const payload = {
165169
code: param.apiKey,
166170
client_id: "971735641612-am059p55sofdp30p2t4djecn72l6kmpf.apps.googleusercontent.com",
167-
client_secret: "epw3f_WvEn0Uwqi6kE7DBQl7",
171+
client_secret: __SECRET__,
168172
redirect_uri: "urn:ietf:wg:oauth:2.0:oob",
169173
grant_type: "authorization_code",
170174
access_type: "offline"

src/gas/script-api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ class ScriptApi {
142142
const payload = {
143143
refresh_token: context.gapiRefreshToken,
144144
client_id: "971735641612-am059p55sofdp30p2t4djecn72l6kmpf.apps.googleusercontent.com",
145-
client_secret: "epw3f_WvEn0Uwqi6kE7DBQl7",
145+
client_secret: __SECRET__,
146146
redirect_uri: "urn:ietf:wg:oauth:2.0:oob",
147147
grant_type: "refresh_token",
148148
}

0 commit comments

Comments
 (0)