> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloud.coinbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# signInWithSiwe

```ts theme={null}
function signInWithSiwe(options: SignInWithSiweOptions): Promise<SignInWithSiweResult>;
```

Initiates the Sign In With Ethereum (SIWE/EIP-4361) authentication flow.
The server returns a pre-formatted SIWE message for the end user to sign with their Ethereum wallet.
Pass the resulting `flowId` and the wallet signature to `verifySiweSignature` to complete sign-in.

## Parameters

| Parameter | Type                                                                                                        | Description                  |
| --------- | ----------------------------------------------------------------------------------------------------------- | ---------------------------- |
| `options` | [`SignInWithSiweOptions`](/sdks/cdp-sdks-v2/frontend/@coinbase/cdp-core/Type-Aliases/SignInWithSiweOptions) | The options for the sign in. |

## Returns

`Promise`\<[`SignInWithSiweResult`](/sdks/cdp-sdks-v2/frontend/@coinbase/cdp-core/Type-Aliases/SignInWithSiweResult)>

The result of the sign in, including the SIWE message to sign.

## Example

```typescript lines theme={null}
const result = await signInWithSiwe({
  address: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
  chainId: 1,
  domain: "example.com",
  uri: "https://example.com",
});
// Sign result.message with the user's wallet, then call verifySiweSignature
```
