# Guest Guard

A **Guest Guard** restricts access to certain pages for authenticated users, redirecting them away from areas like login or signup if they’re already logged in. Ideal for enhancing user flow and preventing redundant actions.\
\
**The guest guard** is configured at **`src/utils/route-guard/GuestGuard.tsx`**\
\
We have used it in the same way as follows:

```typescript
<GuestGuard>
      <AuthLayout />
</GuestGuard>
```


---

# 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://phoenixcoded.gitbook.io/saasable/admin/development/guards/guest-guard.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.
