fix: (auth) token login fix
This commit is contained in:
@@ -118,6 +118,7 @@ async function login(email: string, password: string) {
|
||||
});
|
||||
appRouter.replace({ name: 'index' });
|
||||
} catch (error: unknown) {
|
||||
console.log(error);
|
||||
if (error instanceof AppwriteException) {
|
||||
if (error.type === 'user_session_already_exists') {
|
||||
appRouter.replace({ name: 'index' });
|
||||
|
||||
@@ -87,6 +87,7 @@ import { AppwriteException } from 'appwrite';
|
||||
const email = ref('');
|
||||
const token = ref('');
|
||||
const userId = ref();
|
||||
const router = useRouter();
|
||||
|
||||
console.log('version:' + process.env.VUE_APP_VERSION);
|
||||
|
||||
@@ -120,7 +121,7 @@ const doTokenLogin = async () => {
|
||||
spinner: false,
|
||||
icon: 'check_circle',
|
||||
});
|
||||
useRouter().replace({ name: 'index' });
|
||||
router.replace({ name: 'index' });
|
||||
} catch (error: unknown) {
|
||||
if (error instanceof AppwriteException) {
|
||||
if (error.type === 'user_session_already_exists') {
|
||||
|
||||
Reference in New Issue
Block a user