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

# getCurrentUserSync

```ts theme={null}
function getCurrentUserSync(): 
  | null
  | User;
```

Gets the currently signed-in user, if any.

## Returns

\| `null`
\| [`User`](/sdks/cdp-sdks-v2/frontend/@coinbase/cdp-core/Type-Aliases/User)

The currently signed-in user, or null if no user is signed in.

## Example

```typescript lines theme={null}
const user = getCurrentUserSync();
```
