From 7d2e4b7001141c8d99a0d594426735ada38f4c3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20Emir=20=C5=9Een?= Date: Tue, 6 Aug 2024 17:32:14 +0300 Subject: [PATCH] chore(appwrite): update auth provider login method (#409) * chore(appwrite): update auth provider login method * chore(appwrite): update to next major --- refine-nextjs/plugins/data-provider-appwrite/package.json | 2 +- .../src/providers/auth-provider/auth-provider.client.ts | 2 +- refine-vite/plugins/data-provider-appwrite/package.json | 2 +- refine-vite/plugins/data-provider-appwrite/src/authProvider.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/refine-nextjs/plugins/data-provider-appwrite/package.json b/refine-nextjs/plugins/data-provider-appwrite/package.json index c4d6761f..4a881be7 100644 --- a/refine-nextjs/plugins/data-provider-appwrite/package.json +++ b/refine-nextjs/plugins/data-provider-appwrite/package.json @@ -1,6 +1,6 @@ { "dependencies": { - "@refinedev/appwrite": "^6.4.6", + "@refinedev/appwrite": "^7.0.0", "uuid": "^9.0.0", "js-cookie": "^3.0.5", "node-appwrite": "^13.0.0" 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-vite/plugins/data-provider-appwrite/package.json b/refine-vite/plugins/data-provider-appwrite/package.json index b5a42d2c..92d39a42 100644 --- a/refine-vite/plugins/data-provider-appwrite/package.json +++ b/refine-vite/plugins/data-provider-appwrite/package.json @@ -1,6 +1,6 @@ { "dependencies": { - "@refinedev/appwrite": "^6.4.6", + "@refinedev/appwrite": "^7.0.0", "uuid": "^9.0.0" }, "devDependencies": { 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: "/",