#Authentication not working.

25 messages · Page 1 of 1 (latest)

simple sable
#

Hello team…

I had a project built sometimes ago which works just fine both in development and production
As time goes by, I discovered users couldn’t login nor sign up anymore, users details gets stored in the database, but my app just doesn’t proceed to home page.

I had the following code and console error:

export async function signInAccount(user: {email: string; password: string;}) {
try{
const session = await account.createEmailSession(user.email, user.password);
return session;
} catch (error) {
console.log(error)
}
}

This code returned “Creation of a session is prohibited when a session is active”

I did some research and replaced with the following code:

export async function signInAccount(user: {email: string; password: string;}) {
try{
await account.deleteSessions();
const session = await account.createEmailSession(user.email, user.password);
return session;
} catch (error) {
console.log(error);
}
}

Now…the new code throws an error “Appwrite is using local storage for session management, increase your security by adding a custom domain in your API endpoint”
I huge the team to support.

elfin scroll
simple sable
elfin scroll
simple sable
simple sable
#

Hello Steven
Thanks for your patience
This is my network request you asked for

#

I as well need to include, I get the “server error 500” in my Appwrite collection, it stopped displaying my relationships nor attributes, could this be the issue?, I try clearing cache and sessions in my browser
On first login trial, I get the “server error” in my console
After another login trial, I get “creation of session is prohibited when a session is active”.

elfin scroll
elfin scroll
simple sable
#

It just stopped signing users in or out
Then I logged into Appwrite and all my collections couldn’t display, showing “server Error 500”

simple sable
#

Here is my project id :

65cc77f952f028385afa

I urge the team to look into this, as it has gotten me stucked for 3 days now, and every solution I’ve found online, hasn’t worked for me

normal jungle
#

Should this: const session = await account.createEmailSession(user.email, user.password); be instead const session = await account.createEmailPasswordSession(user.email, user.password); ?

simple sable
#

I used createEmailSession

Tried the other function but it returned error, it wasn’t identified

simple sable
#

Anyone attending to my issue?

elfin scroll
elfin scroll
elfin scroll
tame flare
simple sable
#

Quick question though
If I recreate the collections on my former project
Would former users be able to access with there details?
Rather than creating an entirely new project

elfin scroll
simple sable