
Hi 👋 I’m using phone session for users to login to the app and I’m trying to make a method that create a user specific session - admin with EmailSession and delete this session after the method end but when I trigger the method all works fine but when I close the app and open it I’m using the account.get and it’s not return the current user session (not the admin) but in the Appwrite Console I can see the user session wasn’t deleted so what I can do in this situation

What kind of app is this?

its a content app when a user can purchase some content with coins and the permission for update the coins is only for the admin

I meant like, Web, mobile, desktop, etc.

mobile

Using which language?

swift,swiftui

Please do not tag people as it can be very disruptive

help please ***

I don't think you can create another session because it will overwrite the previous session that was persisted

It might work if you use a different endpoint for the admin session (using custom domains).

I see thank you for the help Im pretty new to the sdk so different endpoint you mean: make a new client init with .setEndpoint("custom domain") and login to admin from this client ? How I make the custom domain for iOS App Store app ?

Yes, exactly.
A custom domain in Appwrite: https://appwrite.io/docs/advanced/platform/custom-domains#domain

i did what you said and its worked! solved***

Great, you can edit the post title with [SOLVED]

reuse Session[SOLVED]

[SOLVED]
to the beginning of the title

[SOLVED] reuse Session
Recommended threads
- Upgrade Issue
Am having issue upgrading my appwrite account to pro as my card number is 19 and the required input is 16 digit
- createEmailPasswordSession Error using S...
Did someone succeed using SSR approach for login?
- Trying to Figure out how to delete a use...
If i have a button in an app that allows a user to delete their account, can I not just call a function from my swift app to Appwrite to have the account delete...
