
In web
I created a session using oauth. I run the app logged in but closed the terminal and ran again opened the app(I have now 2 running app in different tab) session is ok close every tab and terminal re run the app there is no session. Either expo clearing the cookies set by appwrite or something else is happening . check is this is the reason
if (Platform.OS === 'web') {
// Web: get params from window.location
const params = new URLSearchParams(window.location.search);
const secret = params.get('secret');
const userId = params.get('userId');
if (secret && userId) {
try {
const res = await account.createSession(userId, secret);
console.log(res);
window.history.replaceState({}, document.title, window.location.pathname);
return await getAccount();
} catch (e) {
console.error('Failed to create session:', e);
return null;
}
}
return null;
}
this is my code. why am I using url search on window?
const result = await WebBrowser.openAuthSessionAsync(loginUrl, scheme);
this is opening a another window (smaller) and redirects in that window. My app is not able to catch that params, which is in the new window. so I set the redirect url as a screen for web and instead of opening new window i dont do anything and on redirect the screen catches the url and creates session. but after that the thing happens what i said at the start. Stuck on development. (Works on expo go)

Any thing I am doing wrong? I thought it was some kind of dev mode issue so i hosted it same thing happens
Recommended threads
- Bulk Update Error
Getting Following error when updating a document: ``` Failed to Update User: Bulk update is not supported for collections with relationship attributes. ``` In...
- How to delete secured files from bucket?
When deleting a user I want to delete all their data including files. How can I delete secured files in cloud/nodejs?
- How to get OTP code in SMTP email temp...
I don't know how to get the OTP code to show in my custom email template for email authentication using OTP. I have email authentication set up for iOS app, an...
