added if cb url was there in path in after login page
This commit is contained in:
@@ -24,12 +24,16 @@ definePageMeta({
|
||||
middleware: ["check-is-not-logged-in"],
|
||||
});
|
||||
|
||||
// state
|
||||
// seo
|
||||
|
||||
useSeoMeta({
|
||||
title : "ورود به فروشگاه"
|
||||
title: "ورود به فروشگاه",
|
||||
});
|
||||
|
||||
// state
|
||||
|
||||
const route = useRoute();
|
||||
|
||||
const { addToast } = useToast();
|
||||
|
||||
const { updateToken, updateRefreshToken } = useAuth();
|
||||
@@ -110,7 +114,6 @@ const handleLogin = async () => {
|
||||
|
||||
updateToken(response.access);
|
||||
updateRefreshToken(response.refresh);
|
||||
await new Promise((resolve) => setTimeout(resolve, 1000));
|
||||
await refetchAccount();
|
||||
|
||||
addToast({
|
||||
@@ -120,7 +123,11 @@ const handleLogin = async () => {
|
||||
},
|
||||
});
|
||||
|
||||
window.location.href = "/";
|
||||
if (route.query.hasOwnProperty("cb_url")) {
|
||||
window.location.href = route.query["cb_url"] as string;
|
||||
} else {
|
||||
window.location.href = "/";
|
||||
}
|
||||
} catch (e) {
|
||||
otpCode.value = [];
|
||||
addToast({ message: "مشکلی پیش آمده" });
|
||||
|
||||
Reference in New Issue
Block a user