Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

Commit

Permalink
Unity 4.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
0xFirekeeper committed Apr 5, 2024
1 parent f768d50 commit 3c88ebf
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/unity/wallets/actions/connect/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ Optional email for default [Embedded Wallet](/unity/wallets/providers/embeddedwa

Must be a `string`.

### phoneNumber

Optional phone number for default [Embedded Wallet](/unity/wallets/providers/embeddedwallet) phone flow.

Must be a `string`.

#### personalWallet

Admin signer to use with [Smart Account](/unity/wallets/providers/smart-wallet) as your main provider.
Expand Down
19 changes: 19 additions & 0 deletions src/app/unity/wallets/providers/embedded-wallet/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,25 @@ var connection = new WalletConnection(
string address = await sdk.Wallet.Connect(connection);
```

### Login with Phone Number

Automatically logs in if previously accessed with the same phone number or prompts for a one-time password (OTP) sent to the user's phone.

```csharp
// Reference to your Thirdweb SDK
var sdk = ThirdwebManager.Instance.SDK;

// Configure the connection
var connection = new WalletConnection(
provider: WalletProvider.EmbeddedWallet,
chainId: 1,
phoneNumber: "+1234567890",
);

// Connect the wallet
string address = await sdk.Wallet.Connect(connection);
```

### Login with OAuth2 (Google, Apple, Facebook, etc.)

This method initiates an OAuth2 login process and redirects back to the app upon successful authentication.
Expand Down

0 comments on commit 3c88ebf

Please sign in to comment.