> ## Documentation Index
> Fetch the complete documentation index at: https://stytch.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Session

> Update session details using the Stytch Vanilla JS SDK

Hydrate a front-end session with a member's session tokens from your backend.

If you log a member in with one of our backend SDKs, you can pass the resulting `session_token` and `session_jwt` to this method to prime the frontend SDK with a valid set of tokens. Then, make a [Session Authenticate](https://stytch.com/docs/api-reference/b2b/frontend-sdks/vanilla-js/methods/sessions/authenticate-session.md) call to authenticate the session tokens and retrieve the user's current session.

## Parameters

**options** `object` *required*

An object containing the session tokens to update the front-end session.

**properties**

**session\_token** `string` *required*

The `session_token` returned from a backend SDK login or session creation method.

**session\_jwt** `string`

The `session_jwt` returned from a backend SDK login or session creation method.

```javascript theme={null}
import { StytchB2BClient } from '@stytch/vanilla-js/b2b';

const stytch = new StytchB2BClient('public-token-test-b8c84de4-7d58-4ffc-9341-432b56596862');

export const authenticate = async () => {
  stytch.session.updateSession({
    session_token: 'a session token from your backend',
    session_jwt: 'a session JWT from your backend',
  });

  const session = await stytch.session.authenticate({ session_duration_minutes: 60 });
};
```
