---
id: auth-session
title: 'session()'
slug: auth-session
custom_edit_url: https://github.com/supabase/supabase/edit/master/spec/supabase_js_v1_legacy.yml
---

import Tabs from '@theme/Tabs'
import TabItem from '@theme/TabItem'

Returns the session data, if there is an active session.

```js
const session = supabase.auth.session()
```

## Examples

### Get the session data

```js
const session = supabase.auth.session()
```
