skapi-js 1.0.33 → 1.0.35
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/dist/skapi.js +1 -1
- package/dist/skapi.js.map +1 -1
- package/dist/skapi.module.js +1 -1
- package/dist/skapi.module.js.map +1 -1
- package/js/main/skapi.js +1 -1
- package/js/methods/user.js +2 -2
- package/package.json +1 -1
package/js/main/skapi.js
CHANGED
package/js/methods/user.js
CHANGED
|
@@ -342,12 +342,12 @@ export async function recoverAccount(redirect = false) {
|
|
|
342
342
|
return 'SUCCESS: Recovery e-mail has been sent.';
|
|
343
343
|
}
|
|
344
344
|
export async function jwtLogin(params) {
|
|
345
|
-
let { hashedPassword, username } = request.bind(this)("jwt-login", params);
|
|
345
|
+
let { hashedPassword, username } = await request.bind(this)("jwt-login", params);
|
|
346
346
|
try {
|
|
347
347
|
return login.bind(this)({ username: username, password: hashedPassword });
|
|
348
348
|
}
|
|
349
349
|
catch (err) {
|
|
350
|
-
if (err
|
|
350
|
+
if (err?.code === 'INCORRECT_USERNAME_OR_PASSWORD') {
|
|
351
351
|
throw new SkapiError('User has migrated the account. Login with the service username and password.', { code: 'INVALID_REQUEST' });
|
|
352
352
|
}
|
|
353
353
|
}
|