Skip to content

Commit

Permalink
chore(appwrite): update auth provider login method
Browse files Browse the repository at this point in the history
  • Loading branch information
aliemir committed Jul 22, 2024
1 parent 1d9768b commit c22defc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: "/",
Expand Down

0 comments on commit c22defc

Please sign in to comment.