💭 Description
Thanks for Taking your time.
Im currently struggling to get the Appwrite web SDK to connect to my locally hosted Appwirte instance.
I spun up AppWrite inside Docker, and setup a new project "testing". When i try to sign in a user via the SKD, i get "404 | ERR_CERT_AUTHORITY_INVALID"
When i try to set "setSelfSigned()" on the client i get the error "client.setEndpoint(...).setProject(...).setSelfSigned is not a function".
Here is my AppwriteService.js file:
import { Account, Avatars, Client, Teams, Storage, Databases, Functions } from 'appwrite';
export const AppwriteEndpoint = "https://localhost/v1";
export const AppwriteProject = "testing";
const client = new Client().setEndpoint(AppwriteEndpoint).setProject(AppwriteProject).setSelfSigned();
const account = new Account(client);
const avatars = new Avatars(client);
const teams = new Teams(client);
const storage = new Storage(client);
const databases = new Databases(client);
const functions = new Functions(client);
export const AppwriteService = {
signOut: async () => {
await account.deleteSession('current');
},
signIn: async (email, password) => {
await account.createEmailSession(email, password);
},
setSession: (hash) => {
const authCookies = {};
authCookies['a_session_' + AppwriteProject] = hash;
client.headers['X-Fallback-Cookies'] = JSON.stringify(authCookies);
}
};
I cant find any documentation on how to get this working. With the node-appwrite package it works like expected, but in the web SDK i cant get it working.
Im using SvelteKit 1.21.0
AppWrite Web SDK version 11.0.0
👀 Have you spent some time to check if this issue has been raised before?
🏢 Have you read the Code of Conduct?
💭 Description
Thanks for Taking your time.
Im currently struggling to get the Appwrite web SDK to connect to my locally hosted Appwirte instance.
I spun up AppWrite inside Docker, and setup a new project "testing". When i try to sign in a user via the SKD, i get "404 | ERR_CERT_AUTHORITY_INVALID"
When i try to set "setSelfSigned()" on the client i get the error "client.setEndpoint(...).setProject(...).setSelfSigned is not a function".
Here is my AppwriteService.js file:
I cant find any documentation on how to get this working. With the node-appwrite package it works like expected, but in the web SDK i cant get it working.
Im using SvelteKit 1.21.0
AppWrite Web SDK version 11.0.0
👀 Have you spent some time to check if this issue has been raised before?
🏢 Have you read the Code of Conduct?