mirror of
https://github.com/supabase/supabase.git
synced 2026-10-15 14:19:11 +03:00
28 lines
479 B
Plaintext
28 lines
479 B
Plaintext
---
|
|
id: auth-getuser
|
|
title: 'getUser()'
|
|
slug: /auth-getuser
|
|
custom_edit_url: https://github.com/supabase/supabase/edit/master/spec/supabase_js_v2_legacy.yml
|
|
---
|
|
|
|
import Tabs from '@theme/Tabs'
|
|
import TabItem from '@theme/TabItem'
|
|
|
|
Returns the user data, refreshing the session if necessary.
|
|
|
|
```js
|
|
const user = supabase.auth.user()
|
|
```
|
|
|
|
## Notes
|
|
|
|
This method gets the user object from memory.
|
|
|
|
## Examples
|
|
|
|
### Get the logged in user
|
|
|
|
```js
|
|
const user = supabase.auth.user()
|
|
```
|