TypeScript
try {
let res = await account.createEmailSession(userinfo.email, userinfo.password); // Using createEmailSession method
let accountDetails = await account.get();
setuser(accountDetails);
navigate('/');
console.log(accountDetails);
} catch (error) {
console.log('email and password is ioncorrect')
}
};
Here is my appwrite config file .
TypeScript
// const VITE_ENDPOINT = import.meta.env.VITE_ENDPOINT;
// const VITE_PROJECTID = import.meta.env.VITE_PROJECTID;
// const VITE_DBID = import.meta.env.VITE_DBID;
// const VITE_COLLECTIONID = import.meta.env.VITE_COLLECTIONID;
// const VITE_BUCKETID = import.meta.env.VITE_BUCKETID;
const VITE_ENDPOINT = 'https://cloud.appwrite.io/v1'
const VITE_PROJECTID = '65e08e'
const VITE_DBID ='65e0981b'
const VITE_COLLECTIONID =''
export { VITE_ENDPOINT, VITE_PROJECTID, VITE_DBID, VITE_COLLECTIONID,VITE_BUCKETID };
const client = new Client()
client
.setEndpoint(VITE_ENDPOINT)
.setProject(VITE_PROJECTID);
export const database=new Databases(client);
export const functions=new Functions(client);
export const storage=new Storage(client);
export const account=new Account(client);
export default client
TL;DR
Developers are receiving a 'section prohibited' error likely due to a misconfiguration in the Appwrite setup. This can be caused by incorrect endpoint, project ID, or missing collection ID. Double check your configuration to resolve the error.Recommended threads
- Issue with OAuth 2.0 authentication
Good evening, I’m reaching out because I’m having a small issue with Appwrite. I’m trying to set up OAuth2 with Twitch, and even though I’m entering the correc...
- Domain Help
My domain estimately.me is verified in Appwrite DNS but SSL certificate keeps failing with: DNS problem: server failure at resolver looking up A for estimately....
- What's the proper way to delete user acc...
I would like to provide an option for the users of my app, to completely remove theirs account if they want to. I don't want to 'deactivate' the account, but to...