@assinafy/cli 2.1.1 → 2.1.2
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/README.en.md +2 -0
- package/README.md +2 -0
- package/dist/api.cjs +5 -1
- package/dist/api.cjs.map +1 -1
- package/dist/api.js +5 -1
- package/dist/api.js.map +1 -1
- package/dist/cli.cjs +84 -11
- package/dist/types/api/resources/oauth.d.ts.map +1 -1
- package/docs/oauth-guide.md +4 -0
- package/package.json +1 -1
package/dist/api.js
CHANGED
|
@@ -1234,7 +1234,11 @@ var OAuthResource = class extends BaseResource {
|
|
|
1234
1234
|
throw new ValidationError("OAuth issuer mismatch");
|
|
1235
1235
|
}
|
|
1236
1236
|
if (callback.searchParams.has("error")) {
|
|
1237
|
-
|
|
1237
|
+
const error = callback.searchParams.get("error");
|
|
1238
|
+
const oauthError = error.length > 0 && error.length <= 64 && !/[^a-z_]/.test(error) ? error : "unknown_error";
|
|
1239
|
+
throw new ValidationError(`OAuth authorization was declined or failed: ${oauthError}`, {
|
|
1240
|
+
oauthError
|
|
1241
|
+
});
|
|
1238
1242
|
}
|
|
1239
1243
|
return this.token({
|
|
1240
1244
|
grant_type: "authorization_code",
|