@@ -147,7 +147,15 @@ request in the "Authorization" header.
147
147
...
148
148
}
149
149
150
- ### 5. Reseting the Access Token
150
+ ## Compatiblity
151
+
152
+ This library was designed to work with any OAuth2 provider, but because of small
153
+ differences in how they implement the standard it may be that some APIs
154
+ aren't compatible. If you find an API that it does't work with, open an issue or
155
+ fix the problem yourself and make a pull request against the source code.
156
+
157
+ ## Other features
158
+ ####Reseting the Access Token
151
159
152
160
If you have an access token set and need to remove it from the property store
153
161
you can remove it with the ` reset() ` function. Before you can call reset you need
@@ -159,7 +167,7 @@ to set the property store.
159
167
.reset();
160
168
}
161
169
162
- ### 6. Setting the Token Format
170
+ #### Setting the Token Format
163
171
164
172
OAuth services can return a token in two ways: as JSON or an URL encoded
165
173
string. You can set what format the the token is in with ` setTokenFormat(tokenFormat) ` .
@@ -170,20 +178,11 @@ JSON is set as default if no token format is choosen.
170
178
return OAuth2.createService('git')
171
179
.setAuthorizationBaseUrl('https://github.com/login/oauth/authorize')
172
180
.setTokenUrl('https://github.com/login/oauth/access_token')
173
- .setClientId(PropertiesService.getScriptProperties().getProperty('ghClient_Id') )
174
- .setClientSecret(PropertiesService.getScriptProperties().getProperty('ghClient_Secret') )
175
- .setProjectKey('MFiKVY_UbWVN0VVVDZTwvash00DPSBbB3 ')
181
+ .setClientId('...' )
182
+ .setClientSecret('...' )
183
+ .setProjectKey('... ')
176
184
.setCallbackFunction('authCallback')
177
185
.setPropertyStore(PropertiesService.getUserProperties())
178
186
.setScope('gist,repo,user')
179
187
.setTokenFormat(OAuth2.TOKEN_FORMAT.FORM_URL_ENCODED);
180
188
}
181
-
182
-
183
-
184
- ## Compatiblity
185
-
186
- This library was designed to work with any OAuth2 provider, but because of small
187
- differences in how they implement the standard it may be that some APIs
188
- aren't compatible. If you find an API that it does't work with, open an issue or
189
- fix the problem yourself and make a pull request against the source code.
0 commit comments