# Loggedin User

To get the data of logged in user wherever you need, simply write one line code i.e.<br>

```
const user = useAuthUser();
```

In the starter template, to get auth user, call useAuthUser hooks. it will return the current logged in user.

```
const [user, authType] = useAuthUser();
```

In the source, there are multiple authenticate methods like AWS, firebase, Auth0, and JWT-auth. then **authType** is used to check which logout method will call for logged in user.

You have to import useAuthUser from&#x20;

```
src/@crema/utility/AppHooks.js
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cremawork.com/v1.0/loggedin-user.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
