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 (#317)
Browse files Browse the repository at this point in the history
* Unity 4.10.0

* Update page.mdx

* fix links

* hide injected fix links
  • Loading branch information
0xFirekeeper authored Apr 5, 2024
1 parent f768d50 commit b40e00e
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 7 deletions.
17 changes: 11 additions & 6 deletions src/app/unity/wallets/actions/connect/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,13 @@ Your Wallet Connection configuration, this is an object that can be used with an

Available providers:

- `WalletProvider.Injected`: [Injected](/unity/wallets/providers/injected)
- `WalletProvider.Coinbase`: [Coinbase Wallet](/unity/wallets/providers/coinbase)
- `WalletProvider.MetaMask`: [MetaMask](/unity/wallets/providers/metamask)
- `WalletProvider.WalletConnect`: [WalletConnect](/unity/wallets/providers/walletconnect)
- `WalletProvider.LocalWallet`: [Local Wallet](/unity/wallets/providers/localwallet)
- `WalletProvider.LocalWallet`: [Local Wallet](/unity/wallets/providers/local-wallet)
- `WalletProvider.SmartWallet`: [Smart Wallet](/unity/wallets/providers/account-abstraction)
- `WalletProvider.Hyperplay`: [Hyperplay](/unity/wallets/providers/hyperplay)
- `WalletProvider.EmbeddedWallet`: [Embedded Wallet](/unity/wallets/providers/embeddedwallet)
- `WalletProvider.EmbeddedWallet`: [Embedded Wallet](/unity/wallets/providers/embedded-wallet)

#### chainId

Expand All @@ -57,13 +56,19 @@ Must be a `BigInteger` (or `int`).

#### password

Optional password for encrypted [Local Wallet](/unity/wallets/providers/localwallet) account, uses auto-generated password if left empty.
Optional password for encrypted [Local Wallet](/unity/wallets/providers/local-wallet) account, uses auto-generated password if left empty.

Must be a `string`.

#### email

Optional email for default [Embedded Wallet](/unity/wallets/providers/embeddedwallet) email flow.
Optional email for default [Embedded Wallet](/unity/wallets/providers/embedded-wallet) email flow.

Must be a `string`.

### phoneNumber

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

Must be a `string`.

Expand All @@ -81,7 +86,7 @@ Must be a `string`.

#### authOptions

[Embedded Wallet](/unity/wallets/providers/embeddedwallet) Authentication Options.
[Embedded Wallet](/unity/wallets/providers/embedded-wallet) Authentication Options.

Must be an `AuthOptions` object.

Expand Down
27 changes: 26 additions & 1 deletion 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 Expand Up @@ -89,7 +108,9 @@ string address = await sdk.Wallet.Connect(connection);

### WebGL

If using Email OTP flow, displays a modal where you can input your OTP code.
If using Email OTP flow, displays an iFrame where you can input your OTP code.

If using Phone OTP flow, displays an iFrame where you can input your OTP code.

If using OAuth2 flow, opens a popup where you can login with your provider account. If successful, the popup will close and the wallet will connect.

Expand All @@ -99,6 +120,8 @@ If using Custom Auth flow, attempts to connect directly after verifying the auth

If using Email OTP flow, displays a modal where you can input your OTP code.

If using Phone OTP flow, displays a modal where you can input your OTP code.

If using the OAuth2 flow, opens the default browser where you can login with your provider account. Connects after the login flow is complete.

If using Custom Auth flow, attempts to connect directly after verifying the auth token.
Expand All @@ -107,6 +130,8 @@ If using Custom Auth flow, attempts to connect directly after verifying the auth

If using Email OTP flow, displays a modal where you can input your OTP code.

If using Phone OTP flow, displays a modal where you can input your OTP code.

If using the OAuth2 flow, interacts with native in-app browser/authentication implementations to login with your provider account. Redirects back to the app through a deep link after the login flow is complete. Only available in builds.

If using Custom Auth flow, attempts to connect directly after verifying the auth token.
Expand Down

0 comments on commit b40e00e

Please sign in to comment.