From c22defcbc0b3d2f0c6e54cb76b3162f1ceb6b40a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20Emir=20=C5=9Een?= Date: Mon, 22 Jul 2024 22:55:51 +0300 Subject: [PATCH] chore(appwrite): update auth provider login method --- .../src/providers/auth-provider/auth-provider.client.ts | 2 +- refine-remix/plugins/data-provider-appwrite/app/authProvider.ts | 2 +- refine-vite/plugins/data-provider-appwrite/src/authProvider.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/refine-nextjs/plugins/data-provider-appwrite/src/providers/auth-provider/auth-provider.client.ts b/refine-nextjs/plugins/data-provider-appwrite/src/providers/auth-provider/auth-provider.client.ts index 2c77579c..922ecf66 100644 --- a/refine-nextjs/plugins/data-provider-appwrite/src/providers/auth-provider/auth-provider.client.ts +++ b/refine-nextjs/plugins/data-provider-appwrite/src/providers/auth-provider/auth-provider.client.ts @@ -13,7 +13,7 @@ export const authProviderClient: AuthProvider = { Cookies.remove(APPWRITE_JWT_KEY, { path: "/" }); appwriteClient.setJWT(""); - await appwriteAccount.createEmailSession(email, password); + await appwriteAccount.createEmailPasswordSession(email, password); const { jwt } = await appwriteAccount.createJWT(); appwriteClient.setJWT(jwt); diff --git a/refine-remix/plugins/data-provider-appwrite/app/authProvider.ts b/refine-remix/plugins/data-provider-appwrite/app/authProvider.ts index e674c7e3..800dbd4d 100644 --- a/refine-remix/plugins/data-provider-appwrite/app/authProvider.ts +++ b/refine-remix/plugins/data-provider-appwrite/app/authProvider.ts @@ -8,7 +8,7 @@ import { account, appwriteClient, TOKEN_KEY } from "./utility"; export const authProvider: AuthProvider = { login: async ({ email, password }) => { try { - await account.createEmailSession(email, password); + await account.createEmailPasswordSession(email, password); const { jwt } = await account.createJWT(); diff --git a/refine-vite/plugins/data-provider-appwrite/src/authProvider.ts b/refine-vite/plugins/data-provider-appwrite/src/authProvider.ts index 2f616657..e83cec31 100644 --- a/refine-vite/plugins/data-provider-appwrite/src/authProvider.ts +++ b/refine-vite/plugins/data-provider-appwrite/src/authProvider.ts @@ -6,7 +6,7 @@ import { account } from "./utility"; export const authProvider: AuthProvider = { login: async ({ email, password }) => { try { - await account.createEmailSession(email, password); + await account.createEmailPasswordSession(email, password); return { success: true, redirectTo: "/",