Back

[SOLVED] reuse Session

  • 1
  • Users
  • Accounts
ROAD 6
15 Dec, 2023, 13:08

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

TL;DR
The user is asking for help on reusing a session in their app. They receive a solution to make a new client for the custom domain and login as admin from that client. The thread also includes a link for creating a custom domain for an iOS app in the Appwrite SDK. The issue of not being able to create multiple sessions without overwriting the previous session is discussed. The thread ends with the user asking for further help on deleting the session. No solution is provided for this last query.
ideclon
15 Dec, 2023, 14:31

What kind of app is this?

ROAD 6
15 Dec, 2023, 15:02

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

ideclon
15 Dec, 2023, 15:06

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

ROAD 6
15 Dec, 2023, 15:30

mobile

ideclon
15 Dec, 2023, 15:33

Using which language?

ROAD 6
15 Dec, 2023, 17:56

swift,swiftui

Drake
15 Dec, 2023, 19:48

Please do not tag people as it can be very disruptive

ROAD 6
16 Dec, 2023, 11:18

help please ***

Drake
16 Dec, 2023, 19:33

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

Drake
16 Dec, 2023, 19:35
ROAD 6
16 Dec, 2023, 21:38

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 ?

Drake
16 Dec, 2023, 21:53
ROAD 6
18 Dec, 2023, 12:01

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

Ernest
18 Dec, 2023, 13:11

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

ROAD 6
18 Dec, 2023, 13:45

reuse Session[SOLVED]

ideclon
18 Dec, 2023, 15:44

[SOLVED] to the beginning of the title

ROAD 6
18 Dec, 2023, 19:53

[SOLVED] reuse Session

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more