# Authentication Layer

### What is Liquid Staking Token? <a href="#introduction-to-liquid-staking" id="introduction-to-liquid-staking"></a>

The authentication layer in Mozi is responsible for securely verifying user identities through social media logins. It ensures that users can access their wallets without the need for traditional passwords while maintaining high levels of security. Mozi integrates OAuth 2.0 protocols to facilitate seamless and secure authentication.

**How It Works**

1. **User Authentication**:
   * When a user chooses to log in via Telegram, Google, or X, Mozi redirects them to the respective platform’s authentication page.
   * The user grants permission for Mozi to access necessary account details.
   * Upon successful authentication, the social media provider returns an OAuth access token to Mozi.
2. **Token Exchange and Session Management**:
   * Mozi exchanges the received access token for a secure session token.
   * This session token is used to identify the user within the Mozi ecosystem, preventing the need to repeatedly authenticate.
   * Refresh tokens are employed to allow continuous access without frequent logins, improving user experience while maintaining security.
3. **Enhanced Security Measures**:
   * Mozi does not store social media passwords, ensuring users retain full control over their credentials.
   * Two-Factor Authentication (2FA) can be enabled to provide an additional layer of security.
   * Active session monitoring and risk-based authentication detect and mitigate suspicious activities in real-time.
4. **Revocation and Logout**:
   * Users can revoke access from their social media account settings at any time, disconnecting their Mozi wallet.
   * Logging out from Mozi ensures the session token is invalidated, requiring re-authentication for future access.

By leveraging modern authentication standards and social login integrations, Mozi provides a secure, user-friendly, and password-free wallet access system.


---

# 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://mozi-1.gitbook.io/mozi/protocol/authentication-layer.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.
