backend-manager 2.5.25 → 2.5.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "backend-manager",
3
- "version": "2.5.25",
3
+ "version": "2.5.26",
4
4
  "description": "Quick tools for developing Firebase functions",
5
5
  "main": "src/manager/index.js",
6
6
  "bin": {
@@ -11,7 +11,8 @@ function OAuth2() {
11
11
 
12
12
  authorize: 'https://discord.com/api/oauth2/authorize',
13
13
  tokenize: 'https://discord.com/api/oauth2/token',
14
- status: ''
14
+ status: '',
15
+ removeAccess: 'https://discord.com/channels/@me',
15
16
  }
16
17
  }
17
18
 
@@ -10,7 +10,8 @@ function OAuth2() {
10
10
  authorize: 'https://accounts.google.com/o/oauth2/v2/auth',
11
11
  tokenize: 'https://oauth2.googleapis.com/token',
12
12
  // status: 'https://oauth2.googleapis.com/tokeninfo?id_token={token}'
13
- status: 'https://oauth2.googleapis.com/tokeninfo'
13
+ status: 'https://oauth2.googleapis.com/tokeninfo',
14
+ removeAccess: 'https://myaccount.google.com/security',
14
15
  }
15
16
  }
16
17
 
@@ -214,6 +214,8 @@ Module.prototype.processState_tokenize = function (newUrl) {
214
214
 
215
215
  if (verifiedIdentity instanceof Error) {
216
216
  return reject(verifiedIdentity);
217
+ } else if (tokenizeResponse && !tokenizeResponse.refresh_token) {
218
+ return reject(new Error(`Missing "refresh_token" in response. This is likely because you disconnected your account and tried to reconnect it. Visit ${self.oauth2.urls.removeAccess} and remove our app from your account and then try again or contact us if you need help!`));
217
219
  }
218
220
 
219
221
  const storeResponse = await self.libraries.admin.firestore().doc(`users/${payload.user.auth.uid}`)