bdy 1.25.29-stage → 1.25.30-stage

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bdy",
3
3
  "preferGlobal": false,
4
- "version": "1.25.29-stage",
4
+ "version": "1.25.30-stage",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "homepage": "https://buddy.works/docs/cli",
@@ -204,10 +204,12 @@ async function oauthServer(api, clientId, clientSecret, forceRegisterEmail, forc
204
204
  async function getOrCreateApp(api) {
205
205
  const ApiClient = require('../api/client').default;
206
206
  const redirectUrl = getRedirectUrl(api);
207
- const client = new ApiClient(new URL(`https://${api}`));
208
207
  let clientId = cfg_1.default.getApiClientId();
209
208
  let clientSecret = cfg_1.default.getApiClientSecret();
210
209
  let clientToken = cfg_1.default.getApiClientToken();
210
+ // getApp authenticates with the registration access token (RFC 7592); without
211
+ // it a backend that checks the token answers 401 and every login re-registers
212
+ const client = new ApiClient(new URL(`https://${api}`), undefined, undefined, undefined, undefined, clientToken || undefined);
211
213
  if (clientId && clientSecret && clientToken) {
212
214
  let clear = false;
213
215
  try {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bdy",
3
3
  "preferGlobal": false,
4
- "version": "1.25.29-stage",
4
+ "version": "1.25.30-stage",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "homepage": "https://buddy.works/docs/cli",