Skip to content

Commit d5cf298

Browse files
Update README.md
1 parent 2850dfb commit d5cf298

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

README.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,15 @@ request in the "Authorization" header.
147147
...
148148
}
149149

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
151159

152160
If you have an access token set and need to remove it from the property store
153161
you can remove it with the `reset()` function. Before you can call reset you need
@@ -159,7 +167,7 @@ to set the property store.
159167
.reset();
160168
}
161169

162-
### 6. Setting the Token Format
170+
####Setting the Token Format
163171

164172
OAuth services can return a token in two ways: as JSON or an URL encoded
165173
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.
170178
return OAuth2.createService('git')
171179
.setAuthorizationBaseUrl('https://github.com/login/oauth/authorize')
172180
.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('...')
176184
.setCallbackFunction('authCallback')
177185
.setPropertyStore(PropertiesService.getUserProperties())
178186
.setScope('gist,repo,user')
179187
.setTokenFormat(OAuth2.TOKEN_FORMAT.FORM_URL_ENCODED);
180188
}
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

Comments
 (0)