> For the complete documentation index, see [llms.txt](https://patterns.opendialog.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://patterns.opendialog.ai/the-pattern-library/authentication/using-in-opendialog.md).

# Using in OpenDialog

{% hint style="info" %}
As you learn about how to implement different patterns in OpenDialog please keep in mind that OpenDialog is a flexible model that can support a variety of different implementations. We urge conversation designers to use the indications below as a means to learn, be inspired or be unblocked but not as the canon of how things should be done in OpenDialog!
{% endhint %}

In OpenDialog, there are two primary places you are likely to put a supporting pattern like authentication. If the entire scenario requires authentication, then it belongs in the welcome conversation. In this case, the scope of authentication is the entire experience.&#x20;

The figure below provides an example of how such a scenario-wide authentication could be handled. Within the Welcome Conversation we have two scenes - one which welcomes the user if they are already authenticated and one which leads them to an Accounting Linking conversation (or an Info conversation for help) if they need to authenticate.

![](/files/IJH59KD7H4x6I1QW5MN3)

If, however, authentication is required only for a specific conversation within the overall scenario, then the authentication could live as a scene within that conversation. This approach is the just-in-time approach to authentication.&#x20;

If some subset of conversations require authentication, but not the entire scenario, then a more complicated solution is required. The design decision for where to put the authentication pattern depends on what parts of the scenario require authentication.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://patterns.opendialog.ai/the-pattern-library/authentication/using-in-opendialog.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
