Skip to content
3 changes: 2 additions & 1 deletion docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,8 @@
"pages": [
"mini-apps/troubleshooting/common-issues",
"mini-apps/troubleshooting/base-app-compatibility",
"mini-apps/troubleshooting/how-search-works"
"mini-apps/troubleshooting/how-search-works",
"mini-apps/troubleshooting/testing"
]
},
{
Expand Down
Binary file added docs/images/miniapps/auth-flowchart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 40 additions & 3 deletions docs/mini-apps/core-concepts/authentication.mdx
Original file line number Diff line number Diff line change
@@ -1,17 +1,54 @@
---
title: Authentication
description: Quick Auth provides instant authentication by leveraging Farcaster's identity system - no passwords, email verification, or complex OAuth flows required.
description: Instantly recognize users, personalize their experience, and securely access wallet or social graph data.
---


## Choosing An Authentication Method
Users in the Base app are authenticated with passkey account using [Sign in with Ethereum](https://docs.login.xyz/) (SIWE) or their Farcaster account using [Sign in With Farcaster](https://docs.farcaster.xyz/developers/siwf/).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Users in the Base app are authenticated with their Base Account using ..."

Is there a reason to say passkey instead of Base Account?


When deciding between SIWE and SIWF, the core question is whether your app depends on Farcaster’s social context or must work outside Farcaster clients.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this just a "line"? because you can SIWF in a browser without needing to be inside of a farcaster client. Its the same as sign in with gmail or the like... so this statement isn't really the crux of the decision as I understand it


![auth-flow-chart](/images/miniapps/auth-flowchart.png)

#### Sending Notifications

If your app plans to send notifications to users, you must use SIWF.
Notifications require a Farcaster identity (FID), which is only available through Sign-in With Farcaster.

You can still support SIWE if your app also needs a universal wallet-based identity, but SIWF is required for any notification functionality.


#### App location

If your app will be used on the open web, other wallets, or standalone mobile apps, use SIWE as your primary authentication.

You can still offer SIWF when the user arrives from a Farcaster client.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How are accounts linked between SIWE outside of a farcaster client and SIWF within a farcaster client?

Are builders supposed to create an association in the database that maps the user's FID to the ethereum wallet they're using?



#### Utilizing Farcaster Social Graph

If your app does not rely on followers, FIDs, casts, or social graph logic, use SIWE and optionally support SIWF for enhanced social features.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "optionally support SIWF" path is unclear to me technically... Are you allowing users to SIWF but not providing any of teh casts / social graph logic / notifications etc because doing so would break the experience for users who are only using SIWE?


If your app does rely on that data, consider if you are willing to require users to have a Farcaster account.

<Tip>
For a complete guide on authenticating users with SIWE, see our [Authenticate Users](/base-account/guides/authenticate-users#add-the-base-sign-in-with-base-button) guide using Sign in with Base.
</Tip>

## Quick Auth

Quick Auth provides instant authentication by leveraging Farcaster's identity system - no passwords, email verification, or complex OAuth flows required.

When Quick Auth is called:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the section between using SIWE vs SIWF we then go into a section that solely talks about SIWF via quick auth. What are the builders who selected SIWE going to do? What is their implementation path?

If we're trying to push builders towards SIWE, should we prioritize that implementation path over quick auth?


* The user authenticates with a signature
* The SDK returns a JWT that your backend verifies to confirm the user's identity
* The backend returns trusted data that can be used for sensitive actions

<Tip>
<Note>
This differs from the [Context API](/mini-apps/core-concepts/context), which provides instant access to user information without authentication but cannot be trusted for sensitive operations.
</Tip>
</Note>


## Implementation
Expand Down
77 changes: 77 additions & 0 deletions docs/mini-apps/troubleshooting/testing.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
title: Test Your App
description: Confidently test your app before going live in the Base app
---

Testing your mini app before launch ensures it functions correctly, displays properly, and provides the user experience you intended. You can test your app using a few different methods, each suited for different stages of development and testing needs. The only requirement is to have your mini app publicly accessible URL via `https://`.

## Base Build Preview Tool

Preview and debug your mini app to ensure it displays correctly in the Base App using the [Preview Tool.](https://www.base.dev/preview)

<Info>
Your browser's console won't show Base-specific logs. Base.dev console provides logs specific to how your mini app works within the Base app, including user context and Base app-specific functionality.
</Info>

### Best for

* Validating correctness of manifest files and required fields
* Using an interactive console for viewing logs
* Signing your app's manifest

### Not ideal for testing
* Full look and feel on your app in Base app
* Chat and Base app specific functionality
* User context functionality

### Steps

1. Navigate to [Base.dev/preview](https://www.base.dev/preview)
2. Log in using your Base app account
3. Paste your app's url in the field
4. Click `Submit`

## Base app

Preview how your app would function directly using the Base App.

### Best for

* Keeping your app private from the feed
* Preview in-app functionality (UX)
* Chat-based applications
* Apps that require user and Base app context

### Not ideal for testing

* Logs
* Validating correctness of manifest file

### Steps

1. Enable Developer Mode: **Open Base App > Privacy & Security > toggle Developer Mode**
2. Open preview: **Settings > Developer > Preview**
3. Enter the URL of your mini app
4. Click `Preview`

## In-feed and DMs

Preview your app by posting the URL directly in the Base app feed or by sending a DM to another user.

### Best for

* Requesting feedback from the public
* Apps that require user and Base app context
* Testing edge cases

### Not ideal for

* Viewing logs
* Validating correctness of manifest file

### Steps

1. Open [Base app](https://join.base.app/)
2. Share your mini app URL by:
- Posting it in the Base app feed, or
- Sending it in a DM to someone or a group chat