> For the complete documentation index, see [llms.txt](https://docs.usemoon.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.usemoon.ai/authentication-750f0518f1d64f82a7ef38dd5cbc4b64.md).

# Authentication

## Supported Authentication Methods

Usemoon.ai supports various authentication methods to ensure a secure and convenient user experience. These methods include:

### Email and Password

A user can log in with their email and password. This method is a traditional way to authenticate users and is widely used.

[#email-and-password](#email-and-password "mention")

### OAuth2 Login with Moon

This method allows users to log in using OAuth2, which is a standard protocol for authorization. It provides a secure and efficient way to authenticate users without sharing their passwords.

[Login with Moon](/authentication-750f0518f1d64f82a7ef38dd5cbc4b64/oauth-2-0-bb827a25ff8f4952abd36548961d97be.md)

### OAuth2 with Custom Providers

In addition to Moon's OAuth2 login, usemoon.ai also supports OAuth2 with custom providers. This means you can integrate with your existing authentication system or use a third-party provider to authenticate users.

[OAuth 2.0](/authentication-750f0518f1d64f82a7ef38dd5cbc4b64/oauth-2.0.md)

### Sign In with Ethereum (SIWE)

Usemoon.ai supports Ethereum address login using SIWE. This method allows users to log in using their Ethereum address and a signature, which is a secure and decentralized way to authenticate users.

[Sign in with Ethereum](/authentication-750f0518f1d64f82a7ef38dd5cbc4b64/siwe-d911f742cd684feca1f334c41c785602.md)

### WebAuthn/Passkey Authentication

Usemoon.ai supports WebAuthn/Passkey authentication, which is a standard for passwordless authentication using public key cryptography. This method provides a secure and convenient way to authenticate users without the need for passwords.

[Passkey](/authentication-750f0518f1d64f82a7ef38dd5cbc4b64/passkey.md)

### API Key Authentication

Usemoon.ai also offers an authentication method that provides an infinite expiry token. This method uses an API key and is ideal for scenarios requiring sustained access without the need for session renewal. This is particularly useful for developer-facing applications where automation processes may be necessary.

[API Key](/authentication-750f0518f1d64f82a7ef38dd5cbc4b64/api-key.md)

### Embedded Accounts

Usemoon.ai supports embedded accounts, which allow users to create an account within another application. This method provides a seamless user experience and eliminates the need for users to create a separate account.

[Embedded accounts](/authentication-750f0518f1d64f82a7ef38dd5cbc4b64/embedded-accounts.md)

### Token Refreshing

Usemoon.ai supports token refreshing, which allows users to obtain a new access token without having to re-authenticate. This method provides a convenient way to maintain access to protected resources without the need for users to re-enter their credentials.

[Token Refreshing](/authentication-750f0518f1d64f82a7ef38dd5cbc4b64/token-refreshing.md)


---

# 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:

```
GET https://docs.usemoon.ai/authentication-750f0518f1d64f82a7ef38dd5cbc4b64.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.
