Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions embedded-wallets/authentication/login/farcaster.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Provide users the ability to log into your app via Farcaster. This login method

## Usage

Before starting a QR login, add the domain of the website where users start sign-in to your Magic application's [Domain Allowlist](/embedded-wallets/authentication/security/allowlists/domain-allowlist#dashboard-configuration). Magic checks that website against the allowlist when it verifies the signed Farcaster message.

You can implement Farcaster Login by including the Farcaster extension to your Magic instance. Once you've created a Magic client-side instance with the extension, log users in by calling `magicClient.farcaster.login()`. You can pass a `showUI` parameter boolean indicating whether or not to show a pre-built modal interface displaying the QR code to the user. When `false`, you can implement a custom UI to continue the Farcaster login.

Once logged in, you can retrieve the user's Magic wallet address using [`getInfo`](/embedded-wallets/sdk/client-side/javascript#getinfo) for Web/React Native.
Expand Down
8 changes: 7 additions & 1 deletion embedded-wallets/authentication/login/siwe.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ SIWE authentication is designed for authentication purposes, so wallet operation

## Usage

### Configure your sign-in domain

In the Magic Dashboard, open **Settings → Allowed Origins & Redirects** and add the website domain your users sign in to. This is required even if general domain allowlist enforcement is off. See [Domain Allowlist](/embedded-wallets/authentication/security/allowlists/domain-allowlist#dashboard-configuration).

The domain and URI in the signed SIWE message must identify the same origin. For example, if the URI is `https://app.example.com/login`, the signed domain must be `app.example.com`. React Native, WebView, and World App integrations also need to sign for an allowed website. They can complete sign-in without sending a referrer header.

### Installation

<CodeGroup>
Expand Down Expand Up @@ -126,4 +132,4 @@ const signInWithWorldcoin = async () => {
throw error;
}
};
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: "Domain Allowlist allows your application to be secure-by-default,

## Overview

The Domain Allowlist is a security feature that restricts which domains can make requests to your Magic application. When enabled, Magic will reject all requests from domains that are not explicitly included in your allowlist.
Use the Domain Allowlist to specify which websites can use your Magic application.

### Security Benefits

Expand All @@ -21,14 +21,14 @@ The Domain Allowlist is a security feature that restricts which domains can make

### How It Works

When a request is made to your Magic application:
For requests covered by general domain allowlist enforcement:

1. **Domain Check**: Magic verifies the requesting domain against your allowlist
2. **Allow/Block**: Requests from allowed domains proceed normally; blocked domains receive an error
3. **User Notification**: Blocked requests show a user-friendly error message explaining the restriction

<Warning>
**Important**: Once enabled, the Domain Allowlist applies to ALL requests to your Magic application. Make sure to add all legitimate domains before enabling this feature.
Add every website where users sign in before enabling general enforcement. For [SIWE](/embedded-wallets/authentication/login/siwe) and [Farcaster Login](/embedded-wallets/authentication/login/farcaster), Magic checks the website in the signed message even when general enforcement is off. These flows require at least one configured website domain.
</Warning>

## Usage
Expand Down Expand Up @@ -106,7 +106,7 @@ For new applications created after December 15, 2023, the Domain Allowlist featu

### Existing Projects

For applications created before December 15, 2023, the Domain Allowlist feature is **optional but highly recommended**. While not enforced, warning messages will appear in your dashboard if the feature is not enabled.
For applications created before December 15, 2023, general domain allowlist enforcement is **optional but highly recommended**. Your dashboard displays a warning when enforcement is off. If your application uses SIWE or Farcaster Login, you still need to add your sign-in domains.

<Warning>
**Security Risk**: Without enabling the Domain Allowlist, your API keys remain vulnerable to unauthorized usage from any domain. We strongly recommend enabling this feature for all applications.
Expand Down
Loading