@arex95/vue-core 1.1.25 → 1.1.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/dist/index.mjs +9 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3353,6 +3353,15 @@ function useAuth(secretKey = getSecretKey()) {
|
|
|
3353
3353
|
const login = async (params, persistence) => {
|
|
3354
3354
|
try {
|
|
3355
3355
|
const { data } = await axiosInstance.post(endpoints.LOGIN, params);
|
|
3356
|
+
if (!data) {
|
|
3357
|
+
throw new Error("LOGIN_ERROR: No data received from login endpoint.");
|
|
3358
|
+
}
|
|
3359
|
+
if (!data.access_token) {
|
|
3360
|
+
throw new Error("LOGIN_ERROR: Access token not found in response.");
|
|
3361
|
+
}
|
|
3362
|
+
if (!data.refresh_token) {
|
|
3363
|
+
throw new Error("LOGIN_ERROR: Refresh token not found in response.");
|
|
3364
|
+
}
|
|
3356
3365
|
configSession({
|
|
3357
3366
|
persistencePreference: persistence,
|
|
3358
3367
|
});
|