> ## Documentation Index
> Fetch the complete documentation index at: https://dynamic-docs-feat-sidebar-revamp.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# handleAuthenticatedUser

### Summary

A handler runs after the user is authenticated and allows for a custom code to handle the user object before the Dynamic SDK finishes the authentication and closes the UI.

### Usage

```jsx
<DynamicContextProvider
  settings={{
    handlers: {
      handleAuthenticatedUser: async (args) => {
        console.log("handleAuthenticatedUser was called", args);

        await customUserObjectProcess(args.user);
      },
    },
  }}
>
  {/* ... rest of your app ... */}
</DynamicContextProvider>
```

### Handler Argument Value

[UserProfile](/react-sdk/objects/userprofile) Authenticated user
