Back

[SOLVED] sessionId

  • 0
  • Android
  • Users
asapsonter
10 Apr, 2023, 08:45

How can i get the user "[SESSION_ID]" to log them out using this function for example:

TypeScript
Account account = new Account(client);

account.deleteSession(
    "[SESSION_ID]"
    new CoroutineCallback<>((result, error) -> {
        if (error != null) {
            error.printStackTrace();
            return;
        }


        Log.d("Appwrite", result.toString());
    })
);
TL;DR
The user is trying to figure out how to log out a user by deleting their session using a specific function in an Android Kotlin SDK. The solution provided is to use the keyword `'current'` as the Session ID if you want to delete the current session. Additionally, a code snippet is given as an example of how to implement this function in Java.
Hmm
10 Apr, 2023, 10:01

If its the current user can log them out by deleting the current session

safwan
10 Apr, 2023, 10:49

if you want to delete the current session, just use 'current' for the Session ID

asapsonter
11 Apr, 2023, 02:36

Oh I missed that. dumb me. Thanks

asapsonter
11 Apr, 2023, 02:38

[Solved] sessionId

asapsonter
11 Apr, 2023, 02:38

SOLVED] sessionId

asapsonter
11 Apr, 2023, 02:39

[SOLVED] sessionId

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