> ## 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 React 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](./authenticate-session) call to authenticate the session tokens and retrieve the user's current session.

## Parameters

<ParamField path="options" type="object" required>
  An object containing the session tokens to update the front-end session.

  <Expandable title="properties">
    <ParamField path="session_token" type="string" required>
      The `session_token` returned from a backend SDK login or session creation method.
    </ParamField>

    <ParamField path="session_jwt" type="string">
      The `session_jwt` returned from a backend SDK login or session creation method.
    </ParamField>
  </Expandable>
</ParamField>

<Panel>
  <RequestExample>
    ```jsx theme={null}
    import { useCallback, useEffect } from 'react';
    import { useStytchMember, useStytchB2BClient } from '@stytch/react/b2b';

    export const App = () => {
      const stytch = useStytchB2BClient();
      const { member } = useStytchMember();

      useEffect(() => {
        if (member) {
          // redirect to logged in experience
        }
      }, [member]);

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

        stytch.session.authenticate({ session_duration_minutes: 60 });
      }, [stytch]);

      return <button onClick={authenticate}>Hydrate session</button>;
    };
    ```
  </RequestExample>
</Panel>
