# Update session vars via re-authentication

**URL:** <https://forum.heroiclabs.com/t/update-session-vars-via-re-authentication/2581>\
**Category:** Runtime Framework\
**Tags:** server-framework, typescript\
**Created:** [April 30, 2022, 3:48pm UTC](https://forum.heroiclabs.com/t/update-session-vars-via-re-authentication/2581 "2022-04-30T15:48:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![formatCvt](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/formatcvt/32/1127_2.png) [@formatCvt](https://forum.heroiclabs.com/u/formatCvt)\
**Post date:** [April 30, 2022, 3:48pm UTC](https://forum.heroiclabs.com/t/update-session-vars-via-re-authentication/2581/1 "2022-04-30T15:48:54Z")

</div>

Looks like we can’t update session variables - [Nakama: Sessions | Heroic Labs Documentation](https://heroiclabs.com/docs/nakama/concepts/session/#setting-with-server)

How we can force user to re-authenticate?

---

<div class="post-metadata">

**Author:** ![Confuzzleinator](https://avatars.discourse-cdn.com/v4/letter/c/dc4da7/32.png) [@Confuzzleinator](https://forum.heroiclabs.com/u/Confuzzleinator)\
**Post date:** [May 2, 2022, 4:41am UTC](https://forum.heroiclabs.com/t/update-session-vars-via-re-authentication/2581/2 "2022-05-02T04:41:48Z")

</div>

I found this if you’re using the C# SDK on the client side.

`await client.SessionLogoutAsync(session);`

For some reason the forum is blocking me from posting a link to their own documentation. If you want to find it, its on the `Client Libraries > Unity` page under the `Authentication > Ending Sessions` section.

---

<div class="post-metadata">

**Author:** ![formatCvt](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/formatcvt/32/1127_2.png) [@formatCvt](https://forum.heroiclabs.com/u/formatCvt)\
**Post date:** [May 4, 2022, 1:21pm UTC](https://forum.heroiclabs.com/t/update-session-vars-via-re-authentication/2581/3 "2022-05-04T13:21:04Z")

</div>

> [@Confuzzleinator](#):
>
> I found this if you’re using the C# SDK on the client side.

thanks, but i’m looking for server side implementation

---

<div class="post-metadata">

**Author:** ![Confuzzleinator](https://avatars.discourse-cdn.com/v4/letter/c/dc4da7/32.png) [@Confuzzleinator](https://forum.heroiclabs.com/u/Confuzzleinator)\
**Post date:** [May 4, 2022, 4:30pm UTC](https://forum.heroiclabs.com/t/update-session-vars-via-re-authentication/2581/4 "2022-05-04T16:30:48Z")

</div>

Looks like its under the Session section in the server side function reference. [Here’s](https://heroiclabs.com/docs/nakama/server-framework/function-reference/typescript/#Sessions) the link to the Typescript functions but I’m sure they have them for Lua and Go as well if you’d prefer those.

---

<div class="post-metadata">

**Author:** ![formatCvt](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/formatcvt/32/1127_2.png) [@formatCvt](https://forum.heroiclabs.com/u/formatCvt)\
**Post date:** [May 16, 2022, 7:07am UTC](https://forum.heroiclabs.com/t/update-session-vars-via-re-authentication/2581/5 "2022-05-16T07:07:09Z")

</div>

I’ve found no in-memory datastore for Typescript, unfortunately. Global variables are freezes. This is impossible via typescript?
