# Authentication

## Overview

This section contains recommendations for the implementation of authentication mechanisms.

{% hint style="info" %}
Reuse existing authentication mechanisms to avoid duplication and attack surface expansion.
{% endhint %}

## General practices

| Authentication scheme                                   | Proof of identity                    | Pages                                                                                                                                             |
| ------------------------------------------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| Authentication with login and password                  | `login` & `password`                 | [Authentication with Login and Password](/application-security-handbook/web-application/authentication/authentication-with-login-and-password.md) |
| Authentication with email and password                  | `email` & `password`                 | [Authentication with Login and Password](/application-security-handbook/web-application/authentication/authentication-with-login-and-password.md) |
| Authentication with a phone number and an one-time code | `phone number` & `one-time password` | [Authentication with Phone Number](/application-security-handbook/web-application/authentication/authentication-with-phone-number.md)             |
| OAuth2 authentication                                   | `third-party system`                 | [OAuth 2.0 Authentication](/application-security-handbook/web-application/authentication/oauth-2.0-authentication.md)                             |
| Multi-factor authentication                             | `one time password`                  | [Multi-factor Authentication](/application-security-handbook/web-application/authentication/multi-factor-authentication.md)                       |


---

# 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://0xn3va.gitbook.io/application-security-handbook/web-application/authentication.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.
