diff --git a/docs/connect-blockchain/algorand.mdx b/docs/connect-blockchain/algorand.mdx index 4ca9cc751..55ec15aed 100644 --- a/docs/connect-blockchain/algorand.mdx +++ b/docs/connect-blockchain/algorand.mdx @@ -9,10 +9,10 @@ description: "Integrate Web3Auth with the Algorand Blockchain | Documentation - import GetUserInfoSnippet from "@site/src/common/docs/_get-userinfo.mdx"; -While using the Web3Auth Web SDK for a non-EVM chain like [Algorand](https://www.algorand.com/) you get a standard provider from which you can get the -private key of the user. Using this private key, you can use the corresponding libraries of the blockchain to make blockchain calls like getting the -user's `account`, fetch `balance`, `sign transaction`, `send transaction`, `read` from and `write` to the smart contract, etc. We have highlighted a -few methods here to get you started quickly on that. +While using the Web3Auth Web SDK for a non-EVM chain like [Algorand](https://algorandtechnologies.com/) you get a standard provider from which you can +get the private key of the user. Using this private key, you can use the corresponding libraries of the blockchain to make blockchain calls like +getting the user's `account`, fetch `balance`, `sign transaction`, `send transaction`, `read` from and `write` to the smart contract, etc. We have +highlighted a few methods here to get you started quickly on that. :::note diff --git a/docs/pnp/migration-guides/ios-v6-to-v7.mdx b/docs/pnp/migration-guides/ios-v6-to-v7.mdx new file mode 100644 index 000000000..5ea4ef470 --- /dev/null +++ b/docs/pnp/migration-guides/ios-v6-to-v7.mdx @@ -0,0 +1,307 @@ +--- +title: PnP IOS SDK - v6 to v7 +displayed_sidebar: docs +description: "PnP IOS SDK - v6 to v7 | Documentation - Web3Auth" +sidebar_label: v6 to v7 +--- + +import TabItem from "@theme/TabItem"; +import Tabs from "@theme/Tabs"; + +## General + +### openlogin v5 is supported + +With V7, Users can now log in from `Sapphire Mainnet` and `Sapphire Devnet`. + +```swift +import Web3Auth + +let web3auth = Web3Auth(W3AInitParams( + clientId: "", + network: .MAINNET, // you can use .sapphire_devnet or .sapphire_mainnet + sdkUrl: ..., + redirectUrl: ..., +)) +``` + +### `Web3AuthState` now has more parameters + +In v7, you can configure additional `coreKitKey` and `coreKitEd25519PrivKey` fields when you initialize `Web3authState`. + +```swift +public struct Web3AuthState: Codable { + public let privKey: String? + public let ed25519PrivKey: String? + public let sessionId: String? + public let userInfo: Web3AuthUserInfo? + public let error: String? + // highlight-start + public let coreKitKey: String? + public let coreKitEd25519PrivKey: String? + // highlight-end +} +``` + +### `W3AInitParams` param configuration changed + +In v7, the whiteLabel parameter type and configuration has changed. And, as mentioned earlier, the sapphire network type has been added. Also several +parameters have been added to `W3AInitParams`. + +#### change of `WhiteLabel` parameter configuration + + + + + +| Parameter | Type | Mandatory | Description | +| ----------------- | ------------------ | --------- | ------------------------------------------------- | +| `name` | `String` | No | Name of your application | +| `logoLight` | `String` | No | Light logo for dark background | +| `logoDark` | `String` | No | Dark logo for light background | +| `defaultLanguage` | `String` | No | Default translation language to be used | +| `dark` | `Boolean` | No | If true, enables dark mode. Default is light mode | +| `theme` | `[String, String]` | No | Whitelabel theme | + + + + + +| Parameter | Type | Description | Default | Mandatory | +| ----------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | --------- | +| `appName` | `String` | App name to be displayed in the User Flow Screens. | dApp's Website URL | No | +| `logoLight` | `String` | App logo to be shown on the dark background (dark theme) | [web3auth-logo.svg](https://images.web3auth.io/web3auth-logo.svg) | No | +| `logoDark` | `String` | App logo to be shown on the light background (light theme) | [web3auth-logo.svg](https://images.web3auth.io/web3auth-logo.svg) | No | +| `defaultLanguage` | `Language` | Default Language to use.
Choose from:
  • `en` - English
  • `de` - German
  • `ja` - Japanese
  • `ko` - Korean
  • `zh` - Mandarin
  • `es` - Spanish
  • `fr` - French
  • `pt` - Portuguese
  • `nl` - Dutch
| en - English | No | +| `mode` | `ThemeModes` | Choose between `auto`, `light` or `dark` modes. | `auto` | No | +| `theme` | `[String: String]` | Used to customize the theme of the login modal with the following options
`'primary'` - To customize the primary color of the modal's content | `#0364FF` | No | +| `appUrl` | `String` | App URL to be displayed in the User Flow Screens. | dApp's Website URL | No | +| `useLogoLoader` | `Bool` | Loads the logo when loading | false | No | + +
+ +
+ +```swift title="Usage" +web3Auth = await Web3Auth( + W3AInitParams( + clientId:"YOUR_CLIENT_ID", + network: .testnet, + // highlight-start + whiteLabel: W3AWhiteLabelData( + appName: "Web3Auth Stub", + logoLight: "https://images.web3auth.io/web3auth-logo-w.svg", + logoDark: "https://images.web3auth.io/web3auth-logo-w.svg", + defaultLanguage: .en, // en, de, ja, ko, zh, es, fr, pt, nl + mode: .dark + theme: ["primary": "#d53f8c"]) + )) + // highlight-end +``` + +#### change of `W3AInitParams` object + +The `Web3Auth` constructor takes an object called `W3AInitParams` as input. The below are the aviliable fields of the `W3AInitParams` object. With v7, +additional 2 parameters, which are `MfaSettings` and `sessionTIme` can be set. + + + + + +| Parameter | Type | Mandatory | Description | +| ---------------- | --------------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `clientId` | String | Yes | Your Web3Auth project ID | +| `network` | Network | Yes | Web3Auth Network to run the authentication on, either `.mainnet`,`.aqua`, `.testnet` or `.cyan` | +| `sdkUrl` | URL | No | Web3Auth sdk frontend to be used. This field is for advanced usage only and should not be changed. | +| `redirectUrl` | String | No | redirectUrl to be passed to the sdk frontend. This field is for advanced usage only and should not be changed. | +| `whiteLabel` | W3AWhiteLabelData | No | A configuration optional object to customize UI, branding, and translations for your brand. Refer to the WhiteLabeling section for more info. | +| `loginConfig` | `[String : W3ALoginConfig]` | No | A configuration optional object to customize login flow. | +| `useCoreKitKey` | `bool` | No | Use CoreKit Key to get core kit key. | +| `chainNamespace` | `ChainNamespace` | No | Chain Namespace [`eip155` and `solana`] | + + + + + +| Parameter | Type | Mandatory | Description | +| ---------------- | --------------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `clientId` | String | Yes | Your Web3Auth project ID | +| `network` | Network | Yes | Web3Auth Network to run the authentication on, either `.mainnet`,`.aqua`, `.testnet`, `.cyan`, or `.sapphire_devnet` or `.sapphire_mainnet` | +| `buildEnv` | BuildEnv | No | Obtion for auth service, `production`, `staging`, `testing` available | +| `sdkUrl` | URL | No | Web3Auth sdk frontend to be used. This field is for advanced usage only and should not be changed. | +| `redirectUrl` | String | No | redirectUrl to be passed to the sdk frontend. This field is for advanced usage only and should not be changed. | +| `whiteLabel` | W3AWhiteLabelData | No | A configuration optional object to customize UI, branding, and translations for your brand. Refer to the WhiteLabeling section for more info. | +| `loginConfig` | `[String : W3ALoginConfig]` | No | A configuration optional object to customize login flow. | +| `useCoreKitKey` | `bool` | No | Use CoreKit Key to get core kit key. | +| `chainNamespace` | `ChainNamespace` | No | Chain Namespace [`eip155` and `solana`] | +| `MfaSettings` | `MfaSettings` | No | Settings for Multi factor authentication | +| `sessionTIme` | Int | No | Session maintainance time | + + + + + +Here's the example configuration of `Web3AuthOptions`. + +```swift + let result = try await Web3Auth(.init( + clientId: clientId, + network: network, + loginConfig: [ + TypeOfLogin.google.rawValue: + .init( + verifier: "w3a-agg-example", + typeOfLogin: .google, + name: "Web3Auth-Aggregate-Verifier-Google-Example", + clientId: "774338308167-q463s7kpvja16l4l0kko3nb925ikds2p.apps.googleusercontent.com", + verifierSubIdentifier: "w3a-google" + ) + ], + whiteLabel: W3AWhiteLabelData( + appName: "Web3Auth Stub", + logoLight: "https://images.web3auth.io/web3auth-logo-w.svg", + logoDark: "https://images.web3auth.io/web3auth-logo-w.svg", + defaultLanguage: .en, // en, de, ja, ko, zh, es, fr, pt, nl + mode: .dark, + theme: ["primary": "#d53f8c"]), + mfaSettings: MfaSettings( + deviceShareFactor: MfaSetting(enable: true, priority: 1), + backUpShareFactor: MfaSetting(enable: true, priority: 2), + socialBackupFactor: MfaSetting(enable: true, priority: 3), + passwordFactor: MfaSetting(enable: true, priority: 4) + ) + )).login( + W3ALoginParams( + loginProvider: .GOOGLE, + dappShare: nil, + extraLoginOptions: ExtraLoginOptions(display: nil, prompt: nil, max_age: nil, ui_locales: nil, id_token_hint: nil, id_token: nil, login_hint: nil, acr_values: nil, scope: nil, audience: nil, connection: nil, domain: nil, client_id: nil, redirect_uri: nil, leeway: nil, verifierIdField: nil, isVerifierIdCaseSensitive: nil, additionalParams: nil), + mfaLevel: .DEFAULT, + curve: .SECP256K1 + )) +``` + +### Using the `mfaSettings` to configure MFA Order + +You can configure the order of MFA or enable/disable MFA type by passing the `mfaSettings` object in `Web3AuthOptions`. + +`MfaSettings` + + + + + +`deviceShareFactor` | `backUpShareFactor` | `socialBackupFactor` | `passwordFactor` + +| Parameter | Type | Mandatory | Description | +| ----------- | ------ | --------- | ---------------------- | +| `enable` | `bool` | Yes | Enable/Disable MFA | +| `priority` | `int` | No | Priority of MFA | +| `mandatory` | `bool` | No | Mandatory/Optional MFA | + + + + + +```swift + + public struct MfaSetting: Codable { + public init(enable: Bool, priority: Int?, mandatory: Bool? = nil) { + self.enable = enable + self.priority = priority + self.mandatory = mandatory + } + + let enable: Bool + let priority: Int? + let mandatory: Bool? + } + + public struct MfaSettings: Codable { + public init(deviceShareFactor: MfaSetting?, backUpShareFactor: MfaSetting?, socialBackupFactor: MfaSetting?, passwordFactor: MfaSetting?) { + self.deviceShareFactor = deviceShareFactor + self.backUpShareFactor = backUpShareFactor + self.socialBackupFactor = socialBackupFactor + self.passwordFactor = passwordFactor + } + + let deviceShareFactor: MfaSetting? + let backUpShareFactor: MfaSetting? + let socialBackupFactor: MfaSetting? + let passwordFactor: MfaSetting? + } + + +``` + + + + + +### `web3.swift` version updated to v1.6 + +With V7, lots of package dependencies have been updated. Among that, version of package `web3.swift` is updated to v1.6.0. Ethereum-related calls from +the client changed lot, so need to care about that. + +### ExtraLoginOptions + +With V7, ExtraLoginOptions now has one more parameter which is `additionalParams: [String : String]?` + + + +| Parameter | Type | Description | +| --------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| `domain` | `string` | Your Auth0 account domain such as `example.auth0.com` or `example.mycompany.com` etc. **Use any random string in case of custom JWT login.** | +| `client_id` | `string` | The Client ID found on your Auth0 Application settings page. **Use web3auth client id in case of custom JWT login.** | +| `redirect_uri` | `string` | The default URL where Auth0 will redirect your browser to with the authentication result. | +| `leeway` | `number` | The value in seconds used to account for clock skew in JWT expirations. | +| `verifierIdField` | `string` | The field in jwt token which maps to verifier id. | +| `isVerifierIdCaseSensitive` | `boolean` | Whether the verifier id field is case sensitive. Defaults to `true` | + + + + + +```swift +public struct ExtraLoginOptions: Codable{ + let display: String? + let prompt: String? + let max_age: String? + let ui_locales: String? + let id_token_hint: String? + let id_token: String? + let login_hint: String? + let acr_values: String? + let scope: String? + let audience: String? + let connection: String? + let domain: String? + let client_id: String? + let redirect_uri: String? + let leeway: Int? + let verifierIdField: String? + let isVerifierIdCaseSensitive: Bool? + // highlight-start + let additionalParams: [String : String]? + // highlight-end +} +``` + + diff --git a/docs/sdk/pnp/android/android.mdx b/docs/sdk/pnp/android/android.mdx index 57c2aedb0..803b6e476 100644 --- a/docs/sdk/pnp/android/android.mdx +++ b/docs/sdk/pnp/android/android.mdx @@ -10,7 +10,7 @@ authenticate users using Web3Auth. For using Web3Auth natively in Android, Web3A key generated in a non-custodial way on successful user authentication. This authentication can be achieved by using any social login options that Web3Auth supports or custom authentication flow of your choice. -#### This Documentation is based on the `5.1.1` SDK Version. +#### This Documentation is based on the `5.3.1` SDK Version. ## Requirements diff --git a/docs/sdk/pnp/android/initialize.mdx b/docs/sdk/pnp/android/initialize.mdx index 653e60697..36a5ef078 100644 --- a/docs/sdk/pnp/android/initialize.mdx +++ b/docs/sdk/pnp/android/initialize.mdx @@ -52,6 +52,8 @@ The Web3Auth Constructor takes an object with `Web3AuthOptions` as input. | loginConfig | LoginConfigItem | No | A configuration optional object to use custom authentication. Refer [Custom Authentication](/pnp/features/custom-authentication) for more info. | | useCoreKitKey | Boolean | No | Use Core Kit Key true to the Core Kit keys. | | chainNamespace | enum com.web3auth.core.Web3Auth.ChainNamespace ["EIP155", "SOLANA"] | No | A configuration optional object to use chain namespace. | +| `mfaSettings` | MfaSettings | No | MFA Settings | +| `sessionTime` | `Int | No | Session Time in seconds, default is `86400` seconds | @@ -59,15 +61,18 @@ The Web3Auth Constructor takes an object with `Web3AuthOptions` as input. ```kotlin data class Web3AuthOptions( - var context: Context, - val clientId: String, - val network: Network, - @Transient var redirectUrl: Uri? = null, - var sdkUrl: String = getSdkUrl(network), - val whiteLabel: WhiteLabelData? = null, - val loginConfig: HashMap? = null, - val useCoreKitKey: Boolean? = false, - val chainNamespace: ChainNamespace? = ChainNamespace.EIP155 + var context: Context, + val clientId: String, + val network: Network, + var buildEnv: BuildEnv? = BuildEnv.PRODUCTION, + @Transient var redirectUrl: Uri? = null, + var sdkUrl: String = getSdkUrl(buildEnv), + val whiteLabel: WhiteLabelData? = null, + val loginConfig: HashMap? = null, + val useCoreKitKey: Boolean? = false, + val chainNamespace: ChainNamespace? = ChainNamespace.EIP155, + val mfaSettings: MfaSettings? = null, + val sessionTime: Int? = 86400 ) ``` @@ -101,6 +106,53 @@ Add the below line to your `app/res/values/strings.xml` file: ``` +### Using the `mfaSettings` to configure MFA Order + +You can configure the order of MFA or enable/disable MFA type by passing the `mfaSettings` object in `Web3AuthOptions`. + +`MfaSettings` + + + + + +`deviceShareFactor` | `backUpShareFactor` | `socialBackupFactor` | `passwordFactor` + +| Parameter | Type | Mandatory | Description | +| ----------- | ------ | --------- | ---------------------- | +| `enable` | `bool` | Yes | Enable/Disable MFA | +| `priority` | `int` | No | Priority of MFA | +| `mandatory` | `bool` | No | Mandatory/Optional MFA | + + + + + +```kotlin + data class MfaSetting( + var enable: Boolean, + var priority: Int?, + var mandatory: Boolean? + ) + + data class MfaSettings( + private var deviceShareFactor: MfaSetting? = null, + private var backUpShareFactor: MfaSetting? = null, + private var socialBackupFactor: MfaSetting? = null, + private var passwordFactor: MfaSetting? = null, + ) +``` + + + + + ### Session Management The Session Management feature allows you to check the existing sessions with Web3Auth. The `sessionResponse()` will allow users to remain diff --git a/docs/sdk/pnp/android/install.mdx b/docs/sdk/pnp/android/install.mdx index 44f35ed04..7cc5d4a27 100644 --- a/docs/sdk/pnp/android/install.mdx +++ b/docs/sdk/pnp/android/install.mdx @@ -27,7 +27,7 @@ Then, in your app-level `build.gradle` dependencies section, add the following: dependencies { // ... // highlight-next-line - implementation 'com.github.Web3Auth:web3auth-android-sdk:5.0.2' + implementation 'com.github.Web3Auth:web3auth-android-sdk:5.3.1' } ``` diff --git a/docs/sdk/pnp/android/mfa.mdx b/docs/sdk/pnp/android/mfa.mdx index 553ee9c57..6ecee5571 100644 --- a/docs/sdk/pnp/android/mfa.mdx +++ b/docs/sdk/pnp/android/mfa.mdx @@ -57,3 +57,84 @@ class MainActivity : AppCompatActivity() { // ... } ``` + +## Using the `mfaSettings` to configure MFA Order + +You can configure the order of MFA or enable/disable MFA type by passing the `mfaSettings` object in `Web3AuthOptions`. + +`MfaSettings` + + + + + +`deviceShareFactor` | `backUpShareFactor` | `socialBackupFactor` | `passwordFactor` + +| Parameter | Type | Mandatory | Description | +| ----------- | ------ | --------- | ---------------------- | +| `enable` | `bool` | Yes | Enable/Disable MFA | +| `priority` | `int` | No | Priority of MFA | +| `mandatory` | `bool` | No | Mandatory/Optional MFA | + + + + + +```kotlin + data class MfaSetting( + var enable: Boolean, + var priority: Int?, + var mandatory: Boolean? + ) + + data class MfaSettings( + private var deviceShareFactor: MfaSetting? = null, + private var backUpShareFactor: MfaSetting? = null, + private var socialBackupFactor: MfaSetting? = null, + private var passwordFactor: MfaSetting? = null, + ) +``` + + + + + +```kotlin + web3Auth = Web3Auth( + Web3AuthOptions( + context = this, + clientId = getString(R.string.web3auth_project_id), // pass over your Web3Auth Client ID from Developer Dashboard + network = Network.SAPPHIRE_MAINNET, // pass over the network you want to use (MAINNET or TESTNET or CYAN, AQUA, SAPPHIRE_MAINNET or SAPPHIRE_TESTNET) + buildEnv = BuildEnv.PRODUCTION, + redirectUrl = Uri.parse("com.w3a.web3authdemoapp://auth"), // your app's redirect URL + // Optional parameters + whiteLabel = WhiteLabelData( + "Web3Auth Android FireBase Example", + null, + null, + null, + Language.EN, + ThemeModes.LIGHT, + true, + hashMapOf( + "primary" to "#eb5424" + ) + ), + // highlight-start + mfaSettings = MfaSettings( + deviceShareFactor = MfaSetting(true, 1, true), + socialBackupFactor = MfaSetting(true, 2, false), + passwordFactor = MfaSetting(true, 3, false), + backUpShareFactor = MfaSetting(true, 4, false), + ) + // highlight-end + ... // add your loginconfig + ) + ) +``` diff --git a/docs/sdk/pnp/android/whitelabel.mdx b/docs/sdk/pnp/android/whitelabel.mdx index 2bb149f0b..0c27aa298 100644 --- a/docs/sdk/pnp/android/whitelabel.mdx +++ b/docs/sdk/pnp/android/whitelabel.mdx @@ -27,16 +27,16 @@ Object called `whiteLabel`. This parameter takes another object called `WhiteLab -| Parameter | Type | Mandatory | Description | -| ----------------- | ------------------ | --------- | --------------------------------------- | -| `appName` | `String` | No | Name of your application | -| `appUrl` | `String` | No | Url of your application | -| `logoLight` | `String` | No | Light logo for dark background | -| `logoDark` | `String` | No | Dark logo for light background | -| `defaultLanguage` | `String` | No | Default translation language to be used | -| `mode` | `Boolean` | No | 3 Theme modes of the application | -| `theme` | `Map` | No | Whitelabel theme | -| `useLogoLoader` | `Boolean` | No | Loads the logo when loading | +| Parameter | Type | Description | Default | Mandatory | +| ------------------ | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | --------- | +| `appName?` | `string` | App name to be displayed in the User Flow Screens. | dApp's Website URL | No | +| `appUrl?` | `string` | App URL to be displayed in the User Flow Screens. | dApp's Website URL | No | +| `logoLight?` | `string` | App logo to be shown on the dark background (dark theme) | [web3auth-logo.svg](https://images.web3auth.io/web3auth-logo.svg) | No | +| `logoDark?` | `string` | App logo to be shown on the light background (light theme) | [web3auth-logo.svg](https://images.web3auth.io/web3auth-logo.svg) | No | +| `defaultLanguage?` | `string` | Default Language to use.
Choose from:
  • `Language.EN` - English
  • `Language.DE` - German
  • `Language.JA` - Japanese
  • `Language.KO` - Korean
  • `Language.ZH` - Mandarin
  • `Language.ES` - Spanish
  • `Language.FR` - French
  • `Language.PT` - Portuguese
  • `Language.NL` - Dutch
| en - English | No | +| `mode?` | `string` | Choose between `auto`, `light` or `dark` modes. | `auto` | No | +| `theme?` | `Map` | Used to customize the theme of the login modal with the following options
`'primary'` - To customize the primary color of the modal's content | `#0364FF` | No | +| `useLogoLoader` | `Boolean` | Loads the logo when loading | false | No |
diff --git a/docs/sdk/pnp/flutter/custom-authentication.mdx b/docs/sdk/pnp/flutter/custom-authentication.mdx index ee7f5e0bd..3b1c5d094 100644 --- a/docs/sdk/pnp/flutter/custom-authentication.mdx +++ b/docs/sdk/pnp/flutter/custom-authentication.mdx @@ -187,7 +187,16 @@ Future initPlatformState() async { network: Network.testnet, redirectUrl: redirectUrl, whiteLabel: WhiteLabelData( - dark: true, name: "Web3Auth Flutter App", theme: themeMap), + appName: "Web3Auth Flutter App", + logoLight: + "https://www.vectorlogo.zone/logos/flutterio/flutterio-icon.svg", + logoDark: + "https://cdn.icon-icons.com/icons2/2389/PNG/512/flutter_logo_icon_145273.png", + defaultLanguage: Language.en, + mode: ThemeModes.auto, + appUrl: "https://web3auth.io", + useLogoLoader: true, + theme: themeMap), // highlight-next-line loginConfig: loginConfig )); @@ -234,7 +243,16 @@ Future initPlatformState() async { network: Network.testnet, redirectUrl: redirectUrl, whiteLabel: WhiteLabelData( - dark: true, name: "Web3Auth Flutter App", theme: themeMap), + appName: "Web3Auth Flutter App", + logoLight: + "https://www.vectorlogo.zone/logos/flutterio/flutterio-icon.svg", + logoDark: + "https://cdn.icon-icons.com/icons2/2389/PNG/512/flutter_logo_icon_145273.png", + defaultLanguage: Language.en, + mode: ThemeModes.auto, + appUrl: "https://web3auth.io", + useLogoLoader: true, + theme: themeMap), // highlight-next-line loginConfig: loginConfig )); @@ -281,7 +299,16 @@ Future initPlatformState() async { network: Network.testnet, redirectUrl: redirectUrl, whiteLabel: WhiteLabelData( - dark: true, name: "Web3Auth Flutter App", theme: themeMap), + appName: "Web3Auth Flutter App", + logoLight: + "https://www.vectorlogo.zone/logos/flutterio/flutterio-icon.svg", + logoDark: + "https://cdn.icon-icons.com/icons2/2389/PNG/512/flutter_logo_icon_145273.png", + defaultLanguage: Language.en, + mode: ThemeModes.auto, + appUrl: "https://web3auth.io", + useLogoLoader: true, + theme: themeMap), // highlight-next-line loginConfig: loginConfig )); @@ -293,7 +320,7 @@ final Web3AuthResponse response = await Web3AuthFlutter.login( // highlight-start loginProvider: Provider.jwt, extraLoginOptions: ExtraLoginOptions( - id_token: "{YOUR_JWT_TOKEN}" + id_token: "YOUR_JWT_TOKEN" ) // highlight-end ) @@ -444,7 +471,16 @@ Future initPlatformState() async { network: Network.testnet, redirectUrl: redirectUrl, whiteLabel: WhiteLabelData( - dark: true, name: "Web3Auth Flutter App", theme: themeMap), + appName: "Web3Auth Flutter App", + logoLight: + "https://www.vectorlogo.zone/logos/flutterio/flutterio-icon.svg", + logoDark: + "https://cdn.icon-icons.com/icons2/2389/PNG/512/flutter_logo_icon_145273.png", + defaultLanguage: Language.en, + mode: ThemeModes.auto, + appUrl: "https://web3auth.io", + useLogoLoader: true, + theme: themeMap), // highlight-next-line loginConfig: loginConfig )); @@ -456,7 +492,7 @@ final Web3AuthResponse response = await Web3AuthFlutter.login( // highlight-start loginProvider: Provider.jwt, extraLoginOptions: ExtraLoginOptions( - domain: "https://username.us.auth0.com", // domain of your auth0 app + domain: "https://tenant-name.us.auth0.com", // domain of your auth0 app verifierIdField: "sub", // The field in jwt token which maps to verifier id. ) // highlight-end @@ -498,7 +534,16 @@ Future initPlatformState() async { network: Network.testnet, redirectUrl: redirectUrl, whiteLabel: WhiteLabelData( - dark: true, name: "Web3Auth Flutter App", theme: themeMap), + appName: "Web3Auth Flutter App", + logoLight: + "https://www.vectorlogo.zone/logos/flutterio/flutterio-icon.svg", + logoDark: + "https://cdn.icon-icons.com/icons2/2389/PNG/512/flutter_logo_icon_145273.png", + defaultLanguage: Language.en, + mode: ThemeModes.auto, + appUrl: "https://web3auth.io", + useLogoLoader: true, + theme: themeMap), // highlight-next-line loginConfig: loginConfig )); @@ -519,13 +564,17 @@ final Web3AuthResponse response = await Web3AuthFlutter.login( ### Email Passwordless -To use the `EMAIL_PASSWORDLESS` login, you need to put the email into the `login_hint` field of the `extraLoginOptions`. +To use the `EMAIL_PASSWORDLESS` login, you need to put the email into the `login_hint` field of the `extraLoginOptions`. By default, the login flow +will be `code` flow, if you want to use the `link` flow, you need to put `flow_type` into the `additionalParams` field of the `extraLoginOptions`. ```kotlin Future initPlatformState() async { final themeMap = HashMap(); themeMap['primary'] = "#229954"; + final additionalParams = HashMap(); + additionalParams['flow_type'] = "link"; // default is 'code' + Uri redirectUrl; if (Platform.isAndroid) { redirectUrl = Uri.parse('{SCHEME}://{HOST}/auth'); @@ -542,7 +591,16 @@ Future initPlatformState() async { network: Network.testnet, redirectUrl: redirectUrl, whiteLabel: WhiteLabelData( - dark: true, name: "Web3Auth Flutter App", theme: themeMap), + appName: "Web3Auth Flutter App", + logoLight: + "https://www.vectorlogo.zone/logos/flutterio/flutterio-icon.svg", + logoDark: + "https://cdn.icon-icons.com/icons2/2389/PNG/512/flutter_logo_icon_145273.png", + defaultLanguage: Language.en, + mode: ThemeModes.auto, + appUrl: "https://web3auth.io", + useLogoLoader: true, + theme: themeMap), )); } @@ -550,5 +608,5 @@ Future initPlatformState() async { final Web3AuthResponse response = await Web3AuthFlutter.login( LoginParams(loginProvider: Provider.email_passwordless, // highlight-next-line - extraLoginOptions: ExtraLoginOptions(login_hint: "hello@web3auth.io"))); + extraLoginOptions: ExtraLoginOptions(login_hint: "hello@web3auth.io", additionalParams: additionalParams))); ``` diff --git a/docs/sdk/pnp/flutter/dapp-share.mdx b/docs/sdk/pnp/flutter/dapp-share.mdx index bcf7a7e83..168cba940 100644 --- a/docs/sdk/pnp/flutter/dapp-share.mdx +++ b/docs/sdk/pnp/flutter/dapp-share.mdx @@ -9,10 +9,10 @@ import FlutterResponse from "@site/src/common/sdk/pnp/_userinfo_response.mdx"; ## Web3Auth Infrastructure at a glance -If you go through the [Web3Auth infrastructure](/infrastructure/) you'll notice that to enable the non custodiality of Web3Auth, we -split the private key into multiple parts, ie. `shares`. These shares are a part of the off chain multisig, where multiple shares are stored in -different places and can be used to reconstruct the private key dynamically in the user's frontend application. For a glance at the structure of the -shares, these are the following: +If you go through the [Web3Auth infrastructure](/infrastructure/) you'll notice that to enable the non custodiality of Web3Auth, we split the private +key into multiple parts, ie. `shares`. These shares are a part of the off chain multisig, where multiple shares are stored in different places and can +be used to reconstruct the private key dynamically in the user's frontend application. For a glance at the structure of the shares, these are the +following: 1. **`ShareA` is managed by a login service via node operators**: This share is further split amongst a network of nodes and retrieved via conventional authentication flows. @@ -26,13 +26,13 @@ initial setup provides several benefits. ## The User Experience in Mobile Platforms -The user experience in mobile platforms is very different from the web platforms. This is because the user has to be redirected to a browser where +The user experience on mobile platforms is very different from the web platforms. This is because the user has to be redirected to a browser where they can login using their socials and then back to the app once they have been successfully authenticated. This user experience shifts the context -between two applications, whereas in the web platforms, the context remains within the browser only. +between two applications, whereas, in the web platforms, the context remains within the browser only. For the seamless login flow, we need to reconstruct the Shares `A` and `B`. `Share B` is managed by the login service and is provided on successful authentication. Whereas in web platforms, `Share A` is stored in the browser context. We can still store it in the browser context for mobile devices, -but this has a few risks, like user accidently deleting browser data. This is a bigger problem in mobile devices since the user doesn't realise that +but this has a few risks like users accidentally deleting browser data. This is a bigger problem in mobile devices since the user doesn't realize that the browser is being used to login within the app and clearing the browser data can cause their logins to fail. Hence, to tackle this issue, Web3Auth issues a dApp Share, ie. a backup share that can be stored by the app developer directly within their application and used to reconstruct the private key after successful login by the user. @@ -42,18 +42,18 @@ key after successful login by the user. Web3Auth issues a dApp Share, ie. a backup share that can be stored by the app developer directly within their application and used to reconstruct the private key after successful login by the user. -After a successful login from a user, the user details are returned as a response to the application in mobile devices. +After a successful login from a user, the user details are returned as a response to the application on mobile devices. #### Sample Response in Flutter If you notice, the reponses has a field called `dappShare` which is a 24 words seed phrase that can be used to reconstruct the private key. This -dappShare is a suplement to the `Share A` and represents half of the private key. The application can store the dApp share in their own application +dappShare is a supplement to the `Share A` and represents half of the private key. The application can store the dApp share in its own application's local storage safely. Now, while logging in, the user can use their social accounts to obtain one share, and the application provides the dApp Share, removing the need to -store the share in the browser context and enabling user to login seamlessly. This can be done by passing over the stored dApp share value in the +store the share in the browser context and enabling the user to login seamlessly. This can be done by passing over the stored dApp share value in the login function. :::note @@ -95,7 +95,16 @@ Future initPlatformState() async { network: Network.testnet, redirectUrl: redirectUrl, whiteLabel: WhiteLabelData( - dark: true, name: "Web3Auth Flutter App", theme: themeMap) + appName: "Web3Auth Flutter App", + logoLight: + "https://www.vectorlogo.zone/logos/flutterio/flutterio-icon.svg", + logoDark: + "https://cdn.icon-icons.com/icons2/2389/PNG/512/flutter_logo_icon_145273.png", + defaultLanguage: Language.en, + mode: ThemeModes.auto, + appUrl: "https://web3auth.io", + useLogoLoader: true, + theme: themeMap) )); } diff --git a/docs/sdk/pnp/flutter/flutter.mdx b/docs/sdk/pnp/flutter/flutter.mdx index 6f6c28604..b6231da06 100644 --- a/docs/sdk/pnp/flutter/flutter.mdx +++ b/docs/sdk/pnp/flutter/flutter.mdx @@ -9,7 +9,7 @@ Web3Auth provides a [Flutter SDK](https://github.com/Web3Auth/web3auth-flutter-s Flutter app to authenticate users using Web3Auth. It returns a private key generated in a non-custodial way on successful user authentication. This authentication is achieved by using any of the supported social logins Web3Auth provides or using a custom authentication flow of your choice. -#### This Documentation is based on the `2.0.3` SDK Version. +#### This Documentation is based on the `3.1.1` SDK Version. ## Requirements diff --git a/docs/sdk/pnp/flutter/initialize.mdx b/docs/sdk/pnp/flutter/initialize.mdx index b50bacb73..aa21866aa 100644 --- a/docs/sdk/pnp/flutter/initialize.mdx +++ b/docs/sdk/pnp/flutter/initialize.mdx @@ -8,14 +8,14 @@ description: "Web3Auth PnP Flutter SDK - Initialization | Documentation - Web3Au import TabItem from "@theme/TabItem"; import Tabs from "@theme/Tabs"; -After Installation, the next step to use Web3Auth is to Initialize the SDK and is achieved by `init()` function. +After Installation, the next step to use Web3Auth is to Initialize the SDK and is achieved by `init()` and `initialize()` function. Please note that these are the most critical steps where you need to pass on different parameters according to the preference of your project. -Additionally, Whitelabeling and Custom Authentication have to be configured within this step, if you wish to customise your Web3Auth Instance. +Additionally, Whitelabeling and Custom Authentication have to be configured within this step, if you wish to customize your Web3Auth Instance. ## Arguments -Construct and configure the init function with the params as following +Construct and configure the init function with the params as follows `Web3AuthOptions` @@ -32,12 +32,14 @@ Construct and configure the init function with the params as following | Parameter | Type | Mandatory | Description | | ---------------- | ------------------------------------------------------------------------ | --------- | ----------------------------------------------------------------------------------------------------------------------------------- | | `clientId` | `String` | Yes | Your Web3Auth Client ID | -| `network` | `Network` | Yes | Network to run Web3Auth, either `MAINNET`, `TESTNET`, `AQUA` or `CYAN` | -| `redirectUrl` | [Uri class](https://api.dart.dev/stable/2.18.0/dart-core/Uri-class.html) | No | URL that Web3Auth will redirect API responses, default is `null` | +| `network` | `Network` | Yes | Web3Auth Network, `sapphire_mainnet`, `sapphire_devnet`, `mainnet`, `cyan`, `aqua` or `testnet` | +| `redirectUrl` | [Uri class](https://api.dart.dev/stable/2.18.0/dart-core/Uri-class.html) | Yes | URL that Web3Auth will redirect API responses, default is `null` | | `whiteLabel` | `WhiteLabelData` | No | A configuration optional object to customize UI, branding, and translations for your brand. Refer WhiteLabel section for more info. | | `loginConfig` | `HashMap` | No | Login config object | | `useCoreKitKey` | `bool` | No | Use CoreKit Key to get core kit key. | | `chainNamespace` | `ChainNamespace` | No | Chain Namespace [`eip155` and `solana`] | +| `mfaSettings` | `MfaSettings` | No | MFA Settings | +| `sessionTime` | `int` | No | Session Time in seconds, default is `86400` seconds | @@ -47,30 +49,43 @@ Construct and configure the init function with the params as following class Web3AuthOptions { final String clientId; final Network network; - final Uri? redirectUrl; + final BuildEnv? buildEnv; + final String? sdkUrl; + final Uri redirectUrl; final WhiteLabelData? whiteLabel; final HashMap? loginConfig; final bool? useCoreKitKey; final ChainNamespace? chainNamespace; + final MfaSettings? mfaSettings; + final int? sessionTime; Web3AuthOptions( {required this.clientId, required this.network, - this.redirectUrl, + this.buildEnv = BuildEnv.production, + String? sdkUrl, + required this.redirectUrl, this.whiteLabel, this.loginConfig, this.useCoreKitKey, - this.chainNamespace}); + this.chainNamespace = ChainNamespace.eip155, + this.sessionTime = 86400, + this.mfaSettings}) + : sdkUrl = sdkUrl ?? getSdkUrl(buildEnv ?? BuildEnv.production); Map toJson() { return { 'clientId': clientId, 'network': network.name, - 'redirectUrl': redirectUrl?.toString(), + 'sdkUrl': sdkUrl, + 'buildEnv': buildEnv?.name, + 'redirectUrl': redirectUrl.toString(), 'whiteLabel': whiteLabel?.toJson(), 'loginConfig': loginConfig, 'useCoreKitKey': useCoreKitKey, - 'chainNamespace': chainNamespace, + 'chainNamespace': chainNamespace?.name, + 'mfaSettings': mfaSettings, + "sessionTime": sessionTime }; } } @@ -101,9 +116,116 @@ Future initPlatformState() async { // highlight-start await Web3AuthFlutter.init(Web3AuthOptions( clientId: "WEB3AUTH_CLIENT_ID", - network: Network.testnet, + network: Network.sapphire_mainnet, redirectUrl: redirectUrl )); // highlight-end + + // Just after init(), please call the initialize() function + await Web3AuthFlutter.initialize(); +} +``` + +## Using the `mfaSettings` to configure MFA Order + +You can configure the order of MFA or enable/disable MFA type by passing the `mfaSettings` object in `Web3AuthOptions`. + +`MfaSettings` + + + + + +`deviceShareFactor` | `backUpShareFactor` | `socialBackupFactor` | `passwordFactor` + +| Parameter | Type | Mandatory | Description | +| ----------- | ------ | --------- | ---------------------- | +| `enable` | `bool` | Yes | Enable/Disable MFA | +| `priority` | `int` | No | Priority of MFA | +| `mandatory` | `bool` | No | Mandatory/Optional MFA | + + + + + +```dart +class MfaSetting { + final bool enable; + final int? priority; + final bool? mandatory; + + MfaSetting({required this.enable, this.priority, this.mandatory}); + + Map toJson() { + return {'enable': enable, 'priority': priority, 'mandatory': mandatory}; + } } + +class MfaSettings { + final MfaSetting? deviceShareFactor; + final MfaSetting? backUpShareFactor; + final MfaSetting? socialBackupFactor; + final MfaSetting? passwordFactor; + + MfaSettings( + {this.deviceShareFactor, + this.backUpShareFactor, + this.socialBackupFactor, + this.passwordFactor}); + + Map toJson() { + return { + 'deviceShareFactor': deviceShareFactor, + 'backUpShareFactor': backUpShareFactor, + 'socialBackupFactor': socialBackupFactor, + 'passwordFactor': passwordFactor + }; + } +} +``` + + + + + +```dart +Future initPlatformState() async { + + Uri redirectUrl; + if (Platform.isAndroid) { + redirectUrl = Uri.parse('{SCHEME}://{HOST}/auth'); + // w3a://com.example.w3aflutter/auth + } else if (Platform.isIOS) { + redirectUrl = Uri.parse('{bundleId}://openlogin'); + // com.example.w3aflutter://openlogin + } else { + throw UnKnownException('Unknown platform'); + } + + + await Web3AuthFlutter.init(Web3AuthOptions( + clientId: "WEB3AUTH_CLIENT_ID", + network: Network.sapphire_mainnet, + redirectUrl: redirectUrl, + // highlight-start + mfaSettings: MfaSettings( + deviceShareFactor: + MfaSetting(enable: true, priority: 4, mandatory: false), + backUpShareFactor: + MfaSetting(enable: true, priority: 2, mandatory: true), + socialBackupFactor: + MfaSetting(enable: true, priority: 3, mandatory: false), + passwordFactor: + MfaSetting(enable: true, priority: 1, mandatory: true) + )); + // highlight-end + await Web3AuthFlutter.initialize(); +} + ``` diff --git a/docs/sdk/pnp/flutter/install.mdx b/docs/sdk/pnp/flutter/install.mdx index 993c5fc31..a66b163ff 100644 --- a/docs/sdk/pnp/flutter/install.mdx +++ b/docs/sdk/pnp/flutter/install.mdx @@ -11,7 +11,7 @@ Add `web3auth_flutter` as a dependency to your `pubspec.yaml` ```yaml dependencies: - web3auth_flutter: ^2.0.3 + web3auth_flutter: ^3.1.0 ``` or @@ -22,7 +22,8 @@ flutter pub add web3auth_flutter ## Android -- For Android build: `compileSdkVersion` needs to be 33. Check `android/app/build.gradle` in your Flutter project to change it. +- For Android build: `compileSdkVersion` needs to be `34`. + - Check `android/app/build.gradle` in your Flutter project to change it. ### Add Web3Auth to Gradle @@ -40,15 +41,6 @@ dependencyResolutionManagement { } ``` -Then, in your app-level `build.gradle` dependencies section, add the following: - -```groovy -dependencies { - // highlight-next-line - implementation 'com.github.Web3Auth:web3auth-android-sdk:4.0.8' -} -``` - #### Permissions Open your app's `AndroidManifest.xml` file and add the following permission: @@ -113,14 +105,14 @@ Make sure your sign-in activity launchMode is set to **singleTop** in your `Andr https://github.com/Web3Auth/web3auth-swift-sdk ``` - From the `Dependency Rule` dropdown, select `Exact Version` and enter `6.0.1` as the version. + From the `Dependency Rule` dropdown, select `Exact Version` and enter `7.4.0` as the version. 1. When finished, Xcode will automatically begin resolving and downloading your dependencies in the background. ### Cocoapods ```sh -pod 'Web3Auth', '~> 6.0.1' +pod 'Web3Auth', '~> 7.4.0' ``` ### Configuration diff --git a/docs/sdk/pnp/flutter/mfa.mdx b/docs/sdk/pnp/flutter/mfa.mdx index 7a69e0461..2956a1d8e 100644 --- a/docs/sdk/pnp/flutter/mfa.mdx +++ b/docs/sdk/pnp/flutter/mfa.mdx @@ -5,16 +5,21 @@ displayed_sidebar: sdk description: "Web3Auth PnP Flutter SDK - Multi Factor Authentication | Documentation - Web3Auth" --- -The Multi Factor Authentication feature refers to the ability of the user to create a backup share (recovery phrase). This helps them login into a new -device and also to recover their account if they lose their original device. +At Web3Auth, we prioritize your security by offering Multi-Factor Authentication (MFA). MFA is an extra layer of protection that verifies your +identity when accessing your account. To ensure ownership, you must provide two or more different backup factors. You have the option to choose from +the device, social, backup factor (seed phrase), and password factors to guarantee access to your Web3 account. Once you create a recovery factor, MFA +is enabled, and your keys are divided into three shares for off-chain multi-sig, making the key self-custodial. With backup factors, you can easily +recover your account if you lose access to your original device or helps login into a new device. -You can set the mfaLevel within the `loginParams` to customize when mfa screen should be shown to user. It currently accepts 4 values: +## Using the `mfaLevel` to enable MFA -- **`default`** - Setting the mfaLevel to default will present the MFA screen to user on every third login. `mfaLevel: MFALevel.DEFAULT` -- **`optional`** - Setting mfaLevel to optional will present the MFA screen to user on every login but user will have the option to skip it. - `mfaLevel: MFALevel.OPTIONAL` -- **`mandatory`** - Setting mfaLevel to mandatory will make it mandatory for user to setup MFA after login. `mfaLevel: MFALevel.MANDATORY` -- **`none`** - Setting mfaLevel to none will skip the mfa setup screen totally. `mfaLevel: MFALevel.NONE` +For a dApp, we provide various options to set up Multi-Factor Authentication. You can customize the MFA screen by setting the `mfaLevel` argument. You +can enable or disable a backup factor and change their order. Currently, there are four values for `mfaLevel`: + +- `default`: presents the MFA screen every third login +- `optional`: presents the MFA screen on every login, but you can skip it +- `mandatory`: make it mandatory to set up MFA after login +- `none`: skips the MFA setup screen ```dart Web3AuthFlutter.login(LoginParams( @@ -45,7 +50,16 @@ Future initPlatformState() async { network: Network.testnet, redirectUrl: redirectUrl, whiteLabel: WhiteLabelData( - dark: true, name: "Web3Auth Flutter App", theme: themeMap) + appName: "Web3Auth Flutter App", + logoLight: + "https://www.vectorlogo.zone/logos/flutterio/flutterio-icon.svg", + logoDark: + "https://cdn.icon-icons.com/icons2/2389/PNG/512/flutter_logo_icon_145273.png", + defaultLanguage: Language.en, + mode: ThemeModes.auto, + appUrl: "https://web3auth.io", + useLogoLoader: true, + theme: themeMap) )); } @@ -55,3 +69,107 @@ final Web3AuthResponse response = await Web3AuthFlutter.login(LoginParams( mfaLevel: MFALevel.MANDATORY, )); ``` + +## Using the `mfaSettings` to configure MFA Order + +You can configure the order of MFA or enable/disable MFA type by passing the `mfaSettings` object in `Web3AuthOptions`. + +`MfaSettings` + + + + + +`deviceShareFactor` | `backUpShareFactor` | `socialBackupFactor` | `passwordFactor` + +| Parameter | Type | Mandatory | Description | +| ----------- | ------ | --------- | ---------------------- | +| `enable` | `bool` | Yes | Enable/Disable MFA | +| `priority` | `int` | No | Priority of MFA | +| `mandatory` | `bool` | No | Mandatory/Optional MFA | + + + + + +```dart +class MfaSetting { + final bool enable; + final int? priority; + final bool? mandatory; + + MfaSetting({required this.enable, this.priority, this.mandatory}); + + Map toJson() { + return {'enable': enable, 'priority': priority, 'mandatory': mandatory}; + } +} + +class MfaSettings { + final MfaSetting? deviceShareFactor; + final MfaSetting? backUpShareFactor; + final MfaSetting? socialBackupFactor; + final MfaSetting? passwordFactor; + + MfaSettings( + {this.deviceShareFactor, + this.backUpShareFactor, + this.socialBackupFactor, + this.passwordFactor}); + + Map toJson() { + return { + 'deviceShareFactor': deviceShareFactor, + 'backUpShareFactor': backUpShareFactor, + 'socialBackupFactor': socialBackupFactor, + 'passwordFactor': passwordFactor + }; + } +} +``` + + + + + +```dart +Future initPlatformState() async { + + Uri redirectUrl; + if (Platform.isAndroid) { + redirectUrl = Uri.parse('{SCHEME}://{HOST}/auth'); + // w3a://com.example.w3aflutter/auth + } else if (Platform.isIOS) { + redirectUrl = Uri.parse('{bundleId}://openlogin'); + // com.example.w3aflutter://openlogin + } else { + throw UnKnownException('Unknown platform'); + } + + + await Web3AuthFlutter.init(Web3AuthOptions( + clientId: "WEB3AUTH_CLIENT_ID", + network: Network.sapphire_mainnet, + redirectUrl: redirectUrl, + // highlight-start + mfaSettings: MfaSettings( + deviceShareFactor: + MfaSetting(enable: true, priority: 4, mandatory: false), + backUpShareFactor: + MfaSetting(enable: true, priority: 2, mandatory: true), + socialBackupFactor: + MfaSetting(enable: true, priority: 3, mandatory: false), + passwordFactor: + MfaSetting(enable: true, priority: 1, mandatory: true) + )); + // highlight-end + await Web3AuthFlutter.initialize(); +} + +``` diff --git a/docs/sdk/pnp/flutter/usage.mdx b/docs/sdk/pnp/flutter/usage.mdx index 7f0d668b0..b878388e2 100644 --- a/docs/sdk/pnp/flutter/usage.mdx +++ b/docs/sdk/pnp/flutter/usage.mdx @@ -114,9 +114,6 @@ Use getUserInfo() to get the user info of the user. ```dart title="Usage" Future initPlatformState() async { - final themeMap = HashMap(); - themeMap['primary'] = "#229954"; - Uri redirectUrl; if (Platform.isAndroid) { redirectUrl = Uri.parse('{SCHEME}://{HOST}/auth'); @@ -132,9 +129,9 @@ Future initPlatformState() async { clientId: "WEB3AUTH_CLIENT_ID", network: Network.testnet, redirectUrl: redirectUrl, - whiteLabel: WhiteLabelData( - dark: true, name: "Web3Auth Flutter App", theme: themeMap) )); + + await Web3AuthFlutter.initialize(); } // Login @@ -150,8 +147,6 @@ final Web3AuthResponse response = await Web3AuthFlutter.login( ```dart title="Usage" Future initPlatformState() async { - final themeMap = HashMap(); - themeMap['primary'] = "#229954"; Uri redirectUrl; if (Platform.isAndroid) { @@ -168,9 +163,9 @@ Future initPlatformState() async { clientId: "WEB3AUTH_CLIENT_ID", network: Network.testnet, redirectUrl: redirectUrl, - whiteLabel: WhiteLabelData( - dark: true, name: "Web3Auth Flutter App", theme: themeMap) )); + + await Web3AuthFlutter.initialize(); } // Login @@ -186,8 +181,6 @@ final Web3AuthResponse response = await Web3AuthFlutter.login( ```dart title="Usage" Future initPlatformState() async { - final themeMap = HashMap(); - themeMap['primary'] = "#229954"; Uri redirectUrl; if (Platform.isAndroid) { @@ -204,9 +197,9 @@ Future initPlatformState() async { clientId: "WEB3AUTH_CLIENT_ID", network: Network.testnet, redirectUrl: redirectUrl, - whiteLabel: WhiteLabelData( - dark: true, name: "Web3Auth Flutter App", theme: themeMap) )); + + await Web3AuthFlutter.initialize(); } // Login @@ -222,8 +215,6 @@ final Web3AuthResponse response = await Web3AuthFlutter.login( ```dart title="Usage" Future initPlatformState() async { - final themeMap = HashMap(); - themeMap['primary'] = "#229954"; Uri redirectUrl; if (Platform.isAndroid) { @@ -240,9 +231,9 @@ Future initPlatformState() async { clientId: "WEB3AUTH_CLIENT_ID", network: Network.testnet, redirectUrl: redirectUrl, - whiteLabel: WhiteLabelData( - dark: true, name: "Web3Auth Flutter App", theme: themeMap) )); + + await Web3AuthFlutter.initialize(); } // Login @@ -258,8 +249,8 @@ final Web3AuthResponse response = await Web3AuthFlutter.login( ```dart title="Usage" Future initPlatformState() async { - final themeMap = HashMap(); - themeMap['primary'] = "#229954"; + final additionalParams = HashMap(); + additionalParams['flow_type'] = "link"; // default is 'code' Uri redirectUrl; if (Platform.isAndroid) { @@ -276,16 +267,16 @@ Future initPlatformState() async { clientId: "WEB3AUTH_CLIENT_ID", network: Network.testnet, redirectUrl: redirectUrl, - whiteLabel: WhiteLabelData( - dark: true, name: "Web3Auth Flutter App", theme: themeMap) )); + + await Web3AuthFlutter.initialize(); } // Login final Web3AuthResponse response = await Web3AuthFlutter.login( // highlight-start LoginParams(loginProvider: Provider.email_passwordless, - extraLoginOptions: ExtraLoginOptions(login_hint: "hello@web3auth.io"))); + extraLoginOptions: ExtraLoginOptions(login_hint: "hello@web3auth.io", additionalParams: additionalParams))); // highlight-end ``` @@ -295,14 +286,13 @@ final Web3AuthResponse response = await Web3AuthFlutter.login( ```dart title="Usage" Future initPlatformState() async { - final themeMap = HashMap(); - themeMap['primary'] = "#229954"; // highlight-start final loginConfig = new HashMap(); loginConfig['jwt'] = LoginConfigItem( verifier: "verifier-name", // get it from web3auth dashboard typeOfLogin: TypeOfLogin.jwt, + client_id: "CLIENT_ID", // Auth0, Google, Facebook, Twitch, Discord or Web3Auth Client ID ); // highlight-end @@ -320,12 +310,12 @@ Future initPlatformState() async { await Web3AuthFlutter.init(Web3AuthOptions( clientId: "WEB3AUTH_CLIENT_ID", network: Network.testnet, - redirectUrl: redirectUrl, - whiteLabel: WhiteLabelData( - dark: true, name: "Web3Auth Flutter App", theme: themeMap), + redirectUrl: redirectUrl,, // highlight-next-line loginConfig: loginConfig )); + + await Web3AuthFlutter.initialize(); } // Login @@ -496,8 +486,6 @@ final Web3AuthResponse response = await Web3AuthFlutter.login(LoginParams( ```dart title="Usage" Future initPlatformState() async { - final themeMap = HashMap(); - themeMap['primary'] = "#229954"; Uri redirectUrl; if (Platform.isAndroid) { @@ -513,10 +501,9 @@ Future initPlatformState() async { await Web3AuthFlutter.init(Web3AuthOptions( clientId: "WEB3AUTH_CLIENT_ID", network: Network.testnet, - redirectUrl: redirectUrl, - whiteLabel: WhiteLabelData( - dark: true, name: "Web3Auth Flutter App", theme: themeMap) - )); + redirectUrl: redirectUrl)); + + await Web3AuthFlutter.initialize(); } final Web3AuthResponse response = await Web3AuthFlutter.login(LoginParams( @@ -532,8 +519,6 @@ final Web3AuthResponse response = await Web3AuthFlutter.login(LoginParams( ```dart title="Usage" Future initPlatformState() async { - final themeMap = HashMap(); - themeMap['primary'] = "#229954"; Uri redirectUrl; if (Platform.isAndroid) { @@ -549,10 +534,9 @@ Future initPlatformState() async { await Web3AuthFlutter.init(Web3AuthOptions( clientId: "WEB3AUTH_CLIENT_ID", network: Network.testnet, - redirectUrl: redirectUrl, - whiteLabel: WhiteLabelData( - dark: true, name: "Web3Auth Flutter App", theme: themeMap) - )); + redirectUrl: redirectUrl)); + + await Web3AuthFlutter.initialize(); } final Web3AuthResponse response = await Web3AuthFlutter.login(LoginParams( @@ -576,7 +560,7 @@ await Web3AuthFlutter.logout(); #### Response -A void object is returned on successfull logout otherwise an error is thrown +A void object is returned on successful logout otherwise an error is thrown :::tip sample-app diff --git a/docs/sdk/pnp/flutter/whitelabel.mdx b/docs/sdk/pnp/flutter/whitelabel.mdx index b484d329b..0543b6389 100644 --- a/docs/sdk/pnp/flutter/whitelabel.mdx +++ b/docs/sdk/pnp/flutter/whitelabel.mdx @@ -26,14 +26,16 @@ An optional configuration object to customize UI, branding, and translations for -| Parameter | Type | Mandatory | Description | -| ----------------- | ---------------------- | --------- | -------------------------------------------------------- | -| `name` | `String` | No | Name of your application | -| `logoLight` | `String` | No | Light logo for the dark background | -| `logoDark` | `String` | No | Dark logo for the light background | -| `defaultLanguage` | `String` | No | Default language to be used. | -| `dark` | `Boolean` | No | If `true`, enables `Dark mode`. Default is `Light mode`. | -| `theme` | `HashMap` | No | Theme color. | +| Parameter | Type | Mandatory | Description | +| ----------------- | ------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `appName` | `String` | `false` | Name of the app | +| `logoLight` | `String` | `false` | App logo to be shown on the light background (dark mode) | +| `logoDark` | `String` | `false` | App logo to be shown on the dark background (light mode) | +| `defaultLanguage` | `Language` | `false` | Default Language to use.
Choose from:
  • `en` - English
  • `de` - German
  • `ja` - Japanese
  • `ko` - Korean
  • `zh` - Mandarin
  • `es` - Spanish
  • `fr` - French
  • `pt` - Portuguese
  • `nl` - Dutch
| +| `mode` | `ThemeModes` | `false` | Choose between `auto`, `light` or `dark` background modes. | +| `theme` | `HashMap` | `false` | Custom theme for the app | +| `appUrl` | `String` | `false` | App URL | +| `useLogoLoader` | `bool` | `false` | Use logo as loader |
@@ -41,29 +43,35 @@ An optional configuration object to customize UI, branding, and translations for ```dart class WhiteLabelData { - final String? name; + final String? appName; final String? logoLight; final String? logoDark; - final String? defaultLanguage; - final bool? dark; + final Language? defaultLanguage; + final ThemeModes? mode; final HashMap? theme; + final String? appUrl; + final bool? useLogoLoader; WhiteLabelData( - {this.name, + {this.appName, this.logoLight, this.logoDark, - this.defaultLanguage, - this.dark, - this.theme}); + this.defaultLanguage = Language.en, + this.mode = ThemeModes.auto, + this.theme, + this.appUrl, + this.useLogoLoader}); Map toJson() { return { - 'name': name, + 'name': appName, 'logoLight': logoLight, 'logoDark': logoDark, - 'defaultLanguage': defaultLanguage, - 'dark': dark, - 'theme': theme + 'defaultLanguage': defaultLanguage.toString().split('.').last, + 'mode': mode.toString().split('.').last, + 'theme': theme, + 'appUrl': appUrl, + 'useLogoLoader': useLogoLoader }; } } @@ -95,11 +103,18 @@ Future initPlatformState() async { clientId: "WEB3AUTH_CLIENT_ID", network: Network.testnet, redirectUrl: redirectUrl, - defaultLanguage: "en", // en, de, ja, ko, zh, es, fr, pt, nl // highlight-start whiteLabel: WhiteLabelData( - dark: true, name: "Web3Auth Flutter App", theme: themeMap) - )); + appName: "Web3Auth Flutter App", + logoLight: + "https://www.vectorlogo.zone/logos/flutterio/flutterio-icon.svg", + logoDark: + "https://cdn.icon-icons.com/icons2/2389/PNG/512/flutter_logo_icon_145273.png", + defaultLanguage: Language.en, + mode: ThemeModes.auto, + appUrl: "https://web3auth.io", + useLogoLoader: true, + theme: themeMap), // highlight-end } ``` diff --git a/docs/sdk/pnp/ios/custom-authentication.mdx b/docs/sdk/pnp/ios/custom-authentication.mdx index 764af5ded..19fb193b4 100644 --- a/docs/sdk/pnp/ios/custom-authentication.mdx +++ b/docs/sdk/pnp/ios/custom-authentication.mdx @@ -232,6 +232,7 @@ public struct ExtraLoginOptions: Codable{ let leeway: Int? let verifierIdField: String? let isVerifierIdCaseSensitive: Bool? + let additionalParams: [String : String]? } ``` diff --git a/docs/sdk/pnp/ios/initialize.mdx b/docs/sdk/pnp/ios/initialize.mdx index 6d9f25528..e538345b8 100644 --- a/docs/sdk/pnp/ios/initialize.mdx +++ b/docs/sdk/pnp/ios/initialize.mdx @@ -62,10 +62,13 @@ The `Web3Auth` constructor takes an object called `W3AInitParams` as input. The | Parameter | Type | Mandatory | Description | | ---------------- | --------------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------- | | `clientId` | String | Yes | Your Web3Auth project ID | -| `network` | Network | Yes | Web3Auth Network to run the authentication on, either `.mainnet`,`.aqua`, `.testnet` or `.cyan` | +| `network` | Network | Yes | Web3Auth Network to run the authentication on, either `.mainnet`,`.aqua`, `.testnet`, `.cyan`, or `.sapphire_devnet` or `.sapphire_mainnet` | +| `buildEnv` | BuildEnv | No | Obtion for auth service, `production`, `staging`, `testing` available | | `sdkUrl` | URL | No | Web3Auth sdk frontend to be used. This field is for advanced usage only and should not be changed. | | `redirectUrl` | String | No | redirectUrl to be passed to the sdk frontend. This field is for advanced usage only and should not be changed. | | `whiteLabel` | W3AWhiteLabelData | No | A configuration optional object to customize UI, branding, and translations for your brand. Refer to the WhiteLabeling section for more info. | | `loginConfig` | `[String : W3ALoginConfig]` | No | A configuration optional object to customize login flow. | | `useCoreKitKey` | `bool` | No | Use CoreKit Key to get core kit key. | | `chainNamespace` | `ChainNamespace` | No | Chain Namespace [`eip155` and `solana`] | +| `MfaSettings` | `MfaSettings` | No | Settings for Multi factor authentication | +| `sessionTIme` | Int | No | Session maintainance time | diff --git a/docs/sdk/pnp/ios/install.mdx b/docs/sdk/pnp/ios/install.mdx index 68bc690c6..1481a8670 100644 --- a/docs/sdk/pnp/ios/install.mdx +++ b/docs/sdk/pnp/ios/install.mdx @@ -17,14 +17,14 @@ description: "Installing Web3Auth PnP iOS SDK | Documentation - Web3Auth" https://github.com/Web3Auth/web3auth-swift-sdk ``` - From the `Dependency Rule` dropdown, select `Exact Version` and enter `6.0.1` as the version. + From the `Dependency Rule` dropdown, select `Exact Version` and enter `7.4.0` as the version. 1. When finished, Xcode will automatically begin resolving and downloading your dependencies in the background. ## Cocoapods ```sh -pod 'Web3Auth', '~> 6.0.1' +pod 'Web3Auth', '~> 7.4.1' ``` ## Configuration diff --git a/docs/sdk/pnp/ios/ios.mdx b/docs/sdk/pnp/ios/ios.mdx index 599794a3c..6d85e2eda 100644 --- a/docs/sdk/pnp/ios/ios.mdx +++ b/docs/sdk/pnp/ios/ios.mdx @@ -10,7 +10,7 @@ iOS SDK is a client-side library you can use with your iOS app to authenticate u custodial way on successful authentication of the user. This authentication can be achieved by using any of the social logins Web3Auth provides or using a custom authentication flow of your choice. -#### This Documentation is based on the `6.0.1` SDK Version. +#### This Documentation is based on the `7.4.1` SDK Version. ### Requirements diff --git a/docs/sdk/pnp/ios/mfa.mdx b/docs/sdk/pnp/ios/mfa.mdx index 2bd7162ff..dd5ce44fe 100644 --- a/docs/sdk/pnp/ios/mfa.mdx +++ b/docs/sdk/pnp/ios/mfa.mdx @@ -70,3 +70,103 @@ class ViewModel: ObservableObject { } ``` + +## Using the `mfaSettings` to configure MFA Order + +You can configure the order of MFA or enable/disable MFA type by passing the `mfaSettings` object in `Web3AuthOptions`. + +`MfaSettings` + + + + + +`deviceShareFactor` | `backUpShareFactor` | `socialBackupFactor` | `passwordFactor` + +| Parameter | Type | Mandatory | Description | +| ----------- | ------ | --------- | ---------------------- | +| `enable` | `bool` | Yes | Enable/Disable MFA | +| `priority` | `int` | No | Priority of MFA | +| `mandatory` | `bool` | No | Mandatory/Optional MFA | + + + + + +```swift + + public struct MfaSetting: Codable { + public init(enable: Bool, priority: Int?, mandatory: Bool? = nil) { + self.enable = enable + self.priority = priority + self.mandatory = mandatory + } + + let enable: Bool + let priority: Int? + let mandatory: Bool? + } + + public struct MfaSettings: Codable { + public init(deviceShareFactor: MfaSetting?, backUpShareFactor: MfaSetting?, socialBackupFactor: MfaSetting?, passwordFactor: MfaSetting?) { + self.deviceShareFactor = deviceShareFactor + self.backUpShareFactor = backUpShareFactor + self.socialBackupFactor = socialBackupFactor + self.passwordFactor = passwordFactor + } + + let deviceShareFactor: MfaSetting? + let backUpShareFactor: MfaSetting? + let socialBackupFactor: MfaSetting? + let passwordFactor: MfaSetting? + } + + +``` + + + + + +```swift + let result = try await Web3Auth(.init( + clientId: clientId, + network: network, + loginConfig: [ + TypeOfLogin.google.rawValue: + .init( + verifier: "w3a-agg-example", + typeOfLogin: .google, + name: "Web3Auth-Aggregate-Verifier-Google-Example", + clientId: "774338308167-q463s7kpvja16l4l0kko3nb925ikds2p.apps.googleusercontent.com", + verifierSubIdentifier: "w3a-google" + ) + ], + whiteLabel: W3AWhiteLabelData( + appName: "Web3Auth Stub", + logoLight: "https://images.web3auth.io/web3auth-logo-w.svg", + logoDark: "https://images.web3auth.io/web3auth-logo-w.svg", + defaultLanguage: .en, // en, de, ja, ko, zh, es, fr, pt, nl + mode: .dark, + theme: ["primary": "#d53f8c"]), + mfaSettings: MfaSettings( + deviceShareFactor: MfaSetting(enable: true, priority: 1), + backUpShareFactor: MfaSetting(enable: true, priority: 2), + socialBackupFactor: MfaSetting(enable: true, priority: 3), + passwordFactor: MfaSetting(enable: true, priority: 4) + ) + )).login( + W3ALoginParams( + loginProvider: .GOOGLE, + dappShare: nil, + extraLoginOptions: ExtraLoginOptions(display: nil, prompt: nil, max_age: nil, ui_locales: nil, id_token_hint: nil, id_token: nil, login_hint: nil, acr_values: nil, scope: nil, audience: nil, connection: nil, domain: nil, client_id: nil, redirect_uri: nil, leeway: nil, verifierIdField: nil, isVerifierIdCaseSensitive: nil, additionalParams: nil), + mfaLevel: .DEFAULT, + curve: .SECP256K1 + )) +``` diff --git a/docs/sdk/pnp/ios/whitelabel.mdx b/docs/sdk/pnp/ios/whitelabel.mdx index 824af1ff8..2ec5965d2 100644 --- a/docs/sdk/pnp/ios/whitelabel.mdx +++ b/docs/sdk/pnp/ios/whitelabel.mdx @@ -25,14 +25,16 @@ For defining custom UI, branding, and translations for your brand app, you just -| Parameter | Type | Mandatory | Description | -| ----------------- | ------------------ | --------- | ------------------------------------------------- | -| `name` | `String` | No | Name of your application | -| `logoLight` | `String` | No | Light logo for dark background | -| `logoDark` | `String` | No | Dark logo for light background | -| `defaultLanguage` | `String` | No | Default translation language to used | -| `dark` | `Bool` | No | If true, enables dark mode. Default is light mode | -| `theme` | `[String, String]` | No | Whitelabel theme | +| Parameter | Type | Description | Default | Mandatory | +| ----------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | --------- | +| `appName` | `String` | App name to be displayed in the User Flow Screens. | dApp's Website URL | No | +| `logoLight` | `String` | App logo to be shown on the dark background (dark theme) | [web3auth-logo.svg](https://images.web3auth.io/web3auth-logo.svg) | No | +| `logoDark` | `String` | App logo to be shown on the light background (light theme) | [web3auth-logo.svg](https://images.web3auth.io/web3auth-logo.svg) | No | +| `defaultLanguage` | `Language` | Default Language to use.
Choose from:
  • `en` - English
  • `de` - German
  • `ja` - Japanese
  • `ko` - Korean
  • `zh` - Mandarin
  • `es` - Spanish
  • `fr` - French
  • `pt` - Portuguese
  • `nl` - Dutch
| en - English | No | +| `mode` | `ThemeModes` | Choose between `auto`, `light` or `dark` modes. | `auto` | No | +| `theme` | `[String: String]` | Used to customize the theme of the login modal with the following options
`'primary'` - To customize the primary color of the modal's content | `#0364FF` | No | +| `appUrl` | `String` | App URL to be displayed in the User Flow Screens. | dApp's Website URL | No | +| `useLogoLoader` | `Bool` | Loads the logo when loading | false | No |
@@ -40,12 +42,14 @@ For defining custom UI, branding, and translations for your brand app, you just ```swift public struct W3AWhiteLabelData: Codable { - let name: String? + let appName: String? let logoLight: String? let logoDark: String? - let defaultLanguage: String? - let dark: Bool? + let defaultLanguage: Language? + let mode: ThemeModes? let theme: [String: String]? + let appUrl: String? + let useLogoLoader: Bool? } ``` @@ -60,11 +64,11 @@ web3Auth = await Web3Auth( network: .testnet, // highlight-start whiteLabel: W3AWhiteLabelData( - name: "Web3Auth Stub", + appName: "Web3Auth Stub", logoLight: "https://images.web3auth.io/web3auth-logo-w.svg", logoDark: "https://images.web3auth.io/web3auth-logo-w.svg", - defaultLanguage: "en", // en, de, ja, ko, zh, es, fr, pt, nl - dark: true, + defaultLanguage: .en, // en, de, ja, ko, zh, es, fr, pt, nl + mode: .dark theme: ["primary": "#d53f8c"]) )) // highlight-end diff --git a/docs/sdk/pnp/react-native/react-native.mdx b/docs/sdk/pnp/react-native/react-native.mdx index 8472a0c68..94e56704b 100644 --- a/docs/sdk/pnp/react-native/react-native.mdx +++ b/docs/sdk/pnp/react-native/react-native.mdx @@ -10,7 +10,7 @@ TypeScript. The Web3Auth React Native SDK is a client-side library you can use w returns a private key generated in a non-custodial way on successful authentication of the user. This authentication can be achieved by using any of the social logins Web3Auth provides or using a custom authentication flow of your choice. -#### This Documentation is based on the `5.0.0` SDK Version. +#### This Documentation is based on the `5.1.0` SDK Version. ### Requirements diff --git a/docs/troubleshooting/svelte-issues.mdx b/docs/troubleshooting/svelte-issues.mdx new file mode 100644 index 000000000..1e81cee6e --- /dev/null +++ b/docs/troubleshooting/svelte-issues.mdx @@ -0,0 +1,72 @@ +--- +title: Bundler Polyfill Issues - Svelte with Vite +image: "/docs/images/docs-meta-cards/troubleshoot-card.png" +displayed_sidebar: docs +description: "Bundler Polyfill Issues - Svelte with Vite | Documentation - Web3Auth" +--- + +When developing a new web3 project with Svelte and Vite, you may encounter bundler issues due to missing polyfills. This commonly occurs with packages +like `eccrypto` which rely on node modules not present in the browser environment. Directly adding these modules to your package can solve the issue +but may lead to a larger bundle size, affecting load times and user experience. + +It's essential to recognize that the required node polyfills should only be included during development and testing, and the bundler should be +instructed to exclude them from the production build. + +The following guide provides instructions for adding the necessary polyfills in a Svelte project using Vite. + +## Install the missing modules + +First, identify the missing libraries in your build. For integrating Web3Auth with Svelte, you will need to polyfill `buffer` and `process`. For other +libraries, use an alternative like the `empty-module` to prevent build warnings. + +```bash npm2yarn +npm install --save-dev buffer process vite-plugin-node-polyfills +``` + +:::caution + +You may need to polyfill additional libraries depending on the other blockchain libraries you are using with Web3Auth. Common polyfills include +crypto-browserify, stream-browserify, and others listed in the previous guide. + +::: + +## Update your `vite.config.js` + +Modify your Vite configuration to integrate the polyfills with Svelte as follows: + +```tsx +import { sveltekit } from "@sveltejs/kit/vite"; +import { defineConfig } from "vitest/config"; +import { nodePolyfills } from "vite-plugin-node-polyfills"; + +export default defineConfig({ + plugins: [ + nodePolyfills({ + exclude: ["fs"], + globals: { + Buffer: true, + global: true, + process: true, + }, + protocolImports: true, + }), + sveltekit(), + ], + optimizeDeps: { + include: ["dayjs/plugin/relativeTime.js", "dayjs", "@web3auth/ethereum-provider"], + }, + test: { + include: ["src/**/*.{test,spec}.{js,ts}"], + }, +}); +``` + +This configuration sets up the necessary aliases and defines globals for the browser environment, ensuring compatibility and reducing bundle size. + +## Address additional dependency issues + +If there are additional dependencies that need to be polyfilled, consider adding them to the include array in the optimizeDeps section of the Vite +config. Test your application thoroughly to ensure that all functionalities work as expected after the polyfills are added. + +By following these steps, you should be able to resolve bundler polyfill issues in your Svelte and Vite web3 project, leading to a more efficient +build and a smoother user experience. diff --git a/docs/troubleshooting/vite-issues.mdx b/docs/troubleshooting/vite-issues.mdx index fd6b048d9..b345d983c 100644 --- a/docs/troubleshooting/vite-issues.mdx +++ b/docs/troubleshooting/vite-issues.mdx @@ -5,19 +5,19 @@ displayed_sidebar: docs description: "Bundler Polyfill Issues - Vite | Documentation - Web3Auth" --- -While setting up a new web3 project from scratch, you might face multiple issues the bundler. This issue is caused due to the fact that the core -packages like `eccrypto` have certain dependencies, which are not present within the build environment. For rectifying this, the go to method has been -to just add the missing modules directly into the package, and edit the bundler configuration to take advantage of that. +While setting up a new web3 project from scratch, you might face multiple issues with the bundler. This issue is caused because the core packages like +`eccrypto` have certain dependencies, which are not present within the build environment. For rectifying this, the go-to method has been to just add +the missing modules directly into the package, and edit the bundler configuration to take advantage of that. -Although this method works, but it increases the bundle size significantly. Causing slow loading speeds and a bad user experience. It is important to -note that these modules, even while the build fails, are still present within the browser environment. Many libraries like Web3Auth are written in a -way so as to take advantage of this fact. Hence, even if the build doesn't contain the polyfill, the library should still work as expected. However, -if you are using a library which does not take advantage of this fact, you might face issues while using the library. +Although this method works, it increases the bundle size significantly. Causing slow loading speeds and a bad user experience. It is important to note +that these modules, even while the build fails, are still present within the browser environment. Many libraries like Web3Auth are written in a way to +take advantage of this fact. Hence, even if the build doesn't contain the polyfill, the library should still work as expected. However, if you are +using a library that does not take advantage of this fact, you might face issues while using the library. -Hence, you need to be mindful of the fact that you only require certain node polyfills to be added to your project, while testing each of it's +Hence, you need to be mindful of the fact that you only require certain node polyfills to be added to your project, while testing each of its functionalities. At the same time, you need to tell the bundler to ignore the missing modules, and not include them in the build. -In this guide, we have added instructions of adding the polyfills in Vite: +In this guide, we have added instructions for adding the polyfills in Vite: ## Install the missing modules diff --git a/sidebars.js b/sidebars.js index e5200732e..85d070eeb 100644 --- a/sidebars.js +++ b/sidebars.js @@ -128,6 +128,13 @@ module.exports = { collapsible: true, items: ["pnp/migration-guides/android-v4-to-v5"], }, + { + type: "category", + label: "PnP IOS", + collapsed: true, + collapsible: true, + items: ["pnp/migration-guides/ios-v6-to-v7"], + }, "pnp/migration-guides/rn-v3-to-v4", ], @@ -276,6 +283,7 @@ module.exports = { "troubleshooting/error-429", "troubleshooting/webpack-issues", "troubleshooting/vite-issues", + "troubleshooting/svelte-issues", "troubleshooting/metro-issues", "troubleshooting/jwt-errors", "troubleshooting/supported-browsers", diff --git a/src/common/quickstart/_pnp-flutter.mdx b/src/common/quickstart/_pnp-flutter.mdx index 025227694..f6631b799 100644 --- a/src/common/quickstart/_pnp-flutter.mdx +++ b/src/common/quickstart/_pnp-flutter.mdx @@ -6,7 +6,7 @@ Add `web3auth_flutter` as a dependency to your `pubspec.yaml` ```bash dependencies: - web3auth_flutter: ^2.0.3 + web3auth_flutter: ^3.1.0 ``` or @@ -26,11 +26,22 @@ Visit the [Web3Auth Dashboard](https://dashboard.web3auth.io) and create a new p Construct the `Web3Auth` instance with: ```dart +Uri redirectUrl; +if (Platform.isAndroid) { + redirectUrl = Uri.parse('w3a://com.example.w3aflutter/auth'); +} else if (Platform.isIOS) { + redirectUrl = Uri.parse('com.example.w3aflutter://openlogin'); +} else { + throw UnKnownException('Unknown platform'); +} + await Web3AuthFlutter.init(Web3AuthOptions( clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", - network: Network.testnet, + network: Network.sapphire_mainnet, redirectUrl: redirectUrl )); + +await Web3AuthFlutter.initialize(); ``` ### 4. Login your User diff --git a/src/common/sdk/pnp/_userinfo_response.mdx b/src/common/sdk/pnp/_userinfo_response.mdx index c2d297890..6ae7a321b 100644 --- a/src/common/sdk/pnp/_userinfo_response.mdx +++ b/src/common/sdk/pnp/_userinfo_response.mdx @@ -1,17 +1,18 @@ ```json { "userInfo": { - "name": "John Dash", + "email": "w3a-heroes@web3auth.com", + "name": "Web3Auth Heroes", "profileImage": "https://lh3.googleusercontent.com/a/Ajjjsdsmdjmnm...", - "typeOfLogin": "google", - "aggregateVerifier": "tkey-google", "verifier": "torus", - "verifierId": "john@gmail.com", - "email": "john@gmail.com", - "dappShare": "<24 words seed phrase>", // will be sent only incase of custom verifiers + "verifierId": "w3a-heroes@web3auth.com", + "typeOfLogin": "google", + "aggregateVerifier": "w3a-google-sapphire", + "dappShare": "", // 24 words of seed phrase will be sent only incase of custom verifiers "idToken": "", "oAuthIdToken": "", // will be sent only incase of custom verifiers - "oAuthAccessToken": "" // will be sent only incase of custom verifiers + "oAuthAccessToken": "", // will be sent only incase of custom verifiers + "isMfaEnabled": false // Returns whether the user has enabled MFA or not } } ``` diff --git a/src/common/sdk/pnp/android/_response.mdx b/src/common/sdk/pnp/android/_response.mdx index 7c734cf8b..e47e21dc6 100644 --- a/src/common/sdk/pnp/android/_response.mdx +++ b/src/common/sdk/pnp/android/_response.mdx @@ -2,17 +2,18 @@ { "privKey": "0ajjsdsd....", "userInfo": { - "name": "John Dash", + "email": "w3a-heroes@web3auth.com", + "name": "Web3Auth Heroes", "profileImage": "https://lh3.googleusercontent.com/a/Ajjjsdsmdjmnm...", - "typeOfLogin": "google", - "aggregateVerifier": "tkey-google", "verifier": "torus", - "verifierId": "john@gmail.com", - "email": "john@gmail.com", - "dappShare": "<24 words seed phrase>", // will be sent only incase of custom verifiers + "verifierId": "w3a-heroes@web3auth.com", + "typeOfLogin": "google", + "aggregateVerifier": "w3a-google-sapphire", + "dappShare": "", // 24 words of seed phrase will be sent only incase of custom verifiers "idToken": "", "oAuthIdToken": "", // will be sent only incase of custom verifiers - "oAuthAccessToken": "" // will be sent only incase of custom verifiers + "oAuthAccessToken": "", // will be sent only incase of custom verifiers + "isMfaEnabled": false // Returns whether the user has enabled MFA or not }, "ed25519PrivKey": "666523652352635....", "coreKitKey": "0xajjsdsd....", diff --git a/src/common/sdk/pnp/flutter/_response.mdx b/src/common/sdk/pnp/flutter/_response.mdx index 7c734cf8b..e47e21dc6 100644 --- a/src/common/sdk/pnp/flutter/_response.mdx +++ b/src/common/sdk/pnp/flutter/_response.mdx @@ -2,17 +2,18 @@ { "privKey": "0ajjsdsd....", "userInfo": { - "name": "John Dash", + "email": "w3a-heroes@web3auth.com", + "name": "Web3Auth Heroes", "profileImage": "https://lh3.googleusercontent.com/a/Ajjjsdsmdjmnm...", - "typeOfLogin": "google", - "aggregateVerifier": "tkey-google", "verifier": "torus", - "verifierId": "john@gmail.com", - "email": "john@gmail.com", - "dappShare": "<24 words seed phrase>", // will be sent only incase of custom verifiers + "verifierId": "w3a-heroes@web3auth.com", + "typeOfLogin": "google", + "aggregateVerifier": "w3a-google-sapphire", + "dappShare": "", // 24 words of seed phrase will be sent only incase of custom verifiers "idToken": "", "oAuthIdToken": "", // will be sent only incase of custom verifiers - "oAuthAccessToken": "" // will be sent only incase of custom verifiers + "oAuthAccessToken": "", // will be sent only incase of custom verifiers + "isMfaEnabled": false // Returns whether the user has enabled MFA or not }, "ed25519PrivKey": "666523652352635....", "coreKitKey": "0xajjsdsd....", diff --git a/src/common/sdk/pnp/ios/_response.mdx b/src/common/sdk/pnp/ios/_response.mdx index 14ab0a2a2..e47e21dc6 100644 --- a/src/common/sdk/pnp/ios/_response.mdx +++ b/src/common/sdk/pnp/ios/_response.mdx @@ -1,19 +1,23 @@ ```json { - "ed25519PrivKey": "666523652352635....", "privKey": "0ajjsdsd....", "userInfo": { - "aggregateVerifier": "tkey-google", - "email": "john@gmail.com", - "name": "John Dash", + "email": "w3a-heroes@web3auth.com", + "name": "Web3Auth Heroes", "profileImage": "https://lh3.googleusercontent.com/a/Ajjjsdsmdjmnm...", - "typeOfLogin": "google", "verifier": "torus", - "verifierId": "john@gmail.com", - "dappShare": "<24 words seed phrase>", // will be sent only incase of custom verifiers + "verifierId": "w3a-heroes@web3auth.com", + "typeOfLogin": "google", + "aggregateVerifier": "w3a-google-sapphire", + "dappShare": "", // 24 words of seed phrase will be sent only incase of custom verifiers "idToken": "", "oAuthIdToken": "", // will be sent only incase of custom verifiers - "oAuthAccessToken": "" // will be sent only incase of custom verifiers - } + "oAuthAccessToken": "", // will be sent only incase of custom verifiers + "isMfaEnabled": false // Returns whether the user has enabled MFA or not + }, + "ed25519PrivKey": "666523652352635....", + "coreKitKey": "0xajjsdsd....", + "coreKitEd25519PrivKey": "666523652352635....", + "sessionId": "0xajjsdsd...." } ``` diff --git a/src/common/sdk/pnp/web/_openlogin-whitelabel-config.mdx b/src/common/sdk/pnp/web/_openlogin-whitelabel-config.mdx index 263943100..58ab11e11 100644 --- a/src/common/sdk/pnp/web/_openlogin-whitelabel-config.mdx +++ b/src/common/sdk/pnp/web/_openlogin-whitelabel-config.mdx @@ -21,10 +21,10 @@ The whitelabel parameter takes `WhitelabelData` as input. The `WhitelabelData` o | ------------------ | ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | --------- | | `appName?` | `string` | App name to be displayed in the User Flow Screens. | dApp's Website URL | No | | `appUrl?` | `string` | App URL to be displayed in the User Flow Screens. | dApp's Website URL | No | -| `logoLight?` | `string` | App logo to be shown on the dark background (dark theme) | [web3auth-logo.svg](https://images.web3auth.io/web3auth-logo.svg) | No | -| `logoDark?` | `string` | App logo to be shown on the light background (light theme) | [web3auth-logo.svg](https://images.web3auth.io/web3auth-logo.svg) | No | +| `logoLight?` | `string` | App logo to be shown on the light background (light theme) | [web3auth-logo.svg](https://images.web3auth.io/web3auth-logo.svg) | No | +| `logoDark?` | `string` | App logo to be shown on the dark background (dark theme) | [web3auth-logo.svg](https://images.web3auth.io/web3auth-logo.svg) | No | | `defaultLanguage?` | `string` | Default Language to use.
Choose from:
  • `en` - English
  • `de` - German
  • `ja` - Japanese
  • `ko` - Korean
  • `zh` - Mandarin
  • `es` - Spanish
  • `fr` - French
  • `pt` - Portuguese
  • `nl` - Dutch
| en - English | No | -| `mode?` | `string` | Choose between `auto`, `light` or `dark` modes. | `auto` | No | +| `mode?` | `string` | Choose between `auto`, `light` or `dark` background modes. | `auto` | No | | `theme?` | `{ [P in string]: string; }` | Used to customize the theme of the login modal with the following options
`'primary'` - To customize the primary color of the modal's content | `#0364FF` | No | | `tncLink?` | `Partial>` | Language specific link for terms and conditions on torus-website. See (examples/vue-app) to configure e.g. tncLink: `{en: "http://example.com/tnc/en", ja: "http://example.com/tnc/ja"}` | none | No | | `privacyPolicy?` | `Partial>` | Language specific link for privacy policy on torus-website. See (examples/vue-app) to configure e.g. `privacyPolicy: { en: "http://example.com/tnc/en", ja: "http://example.com/tnc/ja", }` | none | No | diff --git a/src/components/HelpCards/index.tsx b/src/components/HelpCards/index.tsx index 1805a4824..c86127efb 100644 --- a/src/components/HelpCards/index.tsx +++ b/src/components/HelpCards/index.tsx @@ -39,7 +39,7 @@ export default function QuickNavigation() {
-
Community Discussions
+
Community Forum

Join our community of passionate developers - learn, grow and get help for your Web3Auth setup.

diff --git a/src/components/navDropdown/help.html b/src/components/navDropdown/help.html index e780ca3d5..356cba3b5 100644 --- a/src/components/navDropdown/help.html +++ b/src/components/navDropdown/help.html @@ -35,7 +35,7 @@

Schedule a Demo

-

Community Discussions

+

Community Forum

Join our community of passionate developers - learn, grow and get help for your Web3Auth setup.

diff --git a/src/pages/content-hub/guides/android.mdx b/src/pages/content-hub/guides/android.mdx index 80df5623f..5d4c44d90 100644 --- a/src/pages/content-hub/guides/android.mdx +++ b/src/pages/content-hub/guides/android.mdx @@ -6,7 +6,7 @@ type: guide tags: [mobile, android, whitelabel, custom authentication, dapp share] date: August 12, 2022 author: Web3Auth Team -order: 7 +order: 6 communityPortalTopicId: 44 --- diff --git a/src/pages/content-hub/guides/firebase.mdx b/src/pages/content-hub/guides/firebase.mdx index 59b6fbed4..472449666 100644 --- a/src/pages/content-hub/guides/firebase.mdx +++ b/src/pages/content-hub/guides/firebase.mdx @@ -6,7 +6,7 @@ type: guide tags: [web, "@web3auth/no-modal", firebase, custom authentication, react, ethereum] date: August 23, 2022 author: Web3Auth Team -order: 5 +order: 4 communityPortalTopicId: 50 --- diff --git a/src/pages/content-hub/guides/flutter-auth0.mdx b/src/pages/content-hub/guides/flutter-auth0.mdx index 834294f45..ed128f4a4 100644 --- a/src/pages/content-hub/guides/flutter-auth0.mdx +++ b/src/pages/content-hub/guides/flutter-auth0.mdx @@ -61,7 +61,7 @@ When integrating Web3Auth Flutter SDK with Social Login the flow looks something - Android API version 24 or newer. -- For Android build: compileSdkVersion needs to be 32. Check `android/app/build.gradle` in your Flutter project to change it. +- For Android build: compileSdkVersion needs to be 34. Check `android/app/build.gradle` in your Flutter project to change it. - iOS 12+ - Xcode 11.4+ / 12.x - Swift 4.x / 5.x @@ -222,7 +222,7 @@ Add `web3auth_flutter` as a dependency to your `pubspec.yaml` ```yaml dependencies: - web3auth_flutter: ^2.0.3 + web3auth_flutter: ^3.1.0 ``` or @@ -257,15 +257,6 @@ dependencyResolutionManagement { } ``` -Then, in your app-level `build.gradle` dependencies section, add the following: - -```groovy -dependencies { - // highlight-next-line - implementation 'com.github.Web3Auth:web3auth-android-sdk:4.0.8' -} -``` - #### Permissions Open your app's `AndroidManifest.xml` file and add the following permission: @@ -324,16 +315,16 @@ If you are using the Swift Package Manager, open the following menu item in Xcod `File > Swift Packages > Add Package Dependency` -In the Choose Package Repository prompt add this url: +In the Choose Package Repository prompt add this URL: ``` -https://github.com/Web3Auth/web3auth-swift-sdk/releases/tag/6.0.1 +https://github.com/Web3Auth/web3auth-swift-sdk/releases/tag/7.4.0 ``` ##### Cocoapods ```sh -pod 'Web3Auth', '~> 6.0.1' +pod 'Web3Auth', '~> 7.4.0' ``` #### Configuration @@ -378,8 +369,6 @@ void initState() { // Initialization Future initPlatformState() async { - HashMap themeMap = new HashMap(); - themeMap['primary'] = "#fff000"; Uri redirectUrl; if (Platform.isAndroid) { @@ -407,10 +396,12 @@ Future initPlatformState() async { loginConfig: loginConfig )); // highlight-end + + await Web3AuthFlutter.initialize(); } ``` -Read more about initialising the Flutter SDK [here](/sdk/pnp/flutter/initialize). +Read more about initializing the Flutter SDK [here](/sdk/pnp/flutter/initialize). ### Authentication @@ -594,7 +585,7 @@ Logging out your user is as simple as calling the `web3AuthFlutter.logout()` fun :::success Blockchain calls -Checkout the full codes to interact with **[ETH Blockchain](/connect-blockchain/ethereum/flutter)**. +Check out the full codes to interact with **[ETH Blockchain](/connect-blockchain/ethereum/flutter)**. ::: @@ -705,7 +696,7 @@ running it locally yourself! `flutter run` -Also, checkout other examples: +Also, check other examples: - [Using Flutter SDK](https://github.com/Web3Auth/web3auth-pnp-examples/tree/main/flutter/flutter-quick-start) - [Using Custom JWT (via Firebase)](https://github.com/Web3Auth/web3auth-pnp-examples/tree/main/flutter/flutter-firebase-example) diff --git a/src/pages/content-hub/guides/flutter-firebase.mdx b/src/pages/content-hub/guides/flutter-firebase.mdx index bb9d8c34e..d0b864016 100644 --- a/src/pages/content-hub/guides/flutter-firebase.mdx +++ b/src/pages/content-hub/guides/flutter-firebase.mdx @@ -58,7 +58,7 @@ When integrating Web3Auth Flutter SDK with Social Login the flow looks something - Android API version 24 or newer. -- For Android build: compileSdkVersion needs to be 32. Check `android/app/build.gradle` in your Flutter project to change it. +- For Android build: compileSdkVersion needs to be 34. Check `android/app/build.gradle` in your Flutter project to change it. - iOS 12+ - Xcode 11.4+ / 12.x @@ -98,7 +98,7 @@ Add `web3auth_flutter` as a dependency to your `pubspec.yaml` ```yaml dependencies: - web3auth_flutter: ^2.0.3 + web3auth_flutter: ^3.1.0 ``` or @@ -133,15 +133,6 @@ dependencyResolutionManagement { } ``` -Then, in your app-level `build.gradle` dependencies section, add the following: - -```groovy -dependencies { - // highlight-next-line - implementation 'com.github.Web3Auth:web3auth-android-sdk:4.0.8' -} -``` - #### Permissions Open your app's `AndroidManifest.xml` file and add the following permission: @@ -200,16 +191,16 @@ If you are using the Swift Package Manager, open the following menu item in Xcod `File > Swift Packages > Add Package Dependency` -In the Choose Package Repository prompt add this url: +In the Choose Package Repository prompt add this URL: ``` -https://github.com/Web3Auth/web3auth-swift-sdk/releases/tag/6.0.1 +https://github.com/Web3Auth/web3auth-swift-sdk/releases/tag/7.4.0 ``` ##### Cocoapods ```sh -pod 'Web3Auth', '~> 6.0.1' +pod 'Web3Auth', '~> 7.4.0' ``` #### Configuration @@ -254,8 +245,6 @@ void initState() { // Initialization Future initPlatformState() async { - HashMap themeMap = new HashMap(); - themeMap['primary'] = "#fff000"; Uri redirectUrl; if (Platform.isAndroid) { @@ -283,10 +272,12 @@ Future initPlatformState() async { loginConfig: loginConfig )); // highlight-end + + await Web3AuthFlutter.initialize(); } ``` -Read more about initialising the Flutter SDK [here](/sdk/pnp/flutter/initialize). +Read more about initializing the Flutter SDK [here](/sdk/pnp/flutter/initialize). ### Authentication @@ -593,7 +584,7 @@ try running it locally yourself! `flutter run` -Also, checkout other examples: +Also, check other examples: - [Using Auth0 Custom Authentication](https://github.com/Web3Auth/web3auth-pnp-examples/tree/main/flutter/flutter-auth0-example) - [Using Flutter SDK](https://github.com/Web3Auth/web3auth-pnp-examples/tree/main/flutter/flutter-quick-start) diff --git a/src/pages/content-hub/guides/flutter.mdx b/src/pages/content-hub/guides/flutter.mdx index c17f7228a..8aaffa228 100644 --- a/src/pages/content-hub/guides/flutter.mdx +++ b/src/pages/content-hub/guides/flutter.mdx @@ -6,7 +6,7 @@ type: guide tags: [mobile, flutter, whitelabel, custom authentication, dapp share, blockchain] date: September 13, 2022 author: Web3Auth Team -order: 8 +order: 9 communityPortalTopicId: 53 --- @@ -58,7 +58,7 @@ When integrating Web3Auth Flutter SDK with Social Login the flow looks something - Android API version 24 or newer. -- For Android build: compileSdkVersion needs to be 32. Check `android/app/build.gradle` in your Flutter project to change it. +- For Android build: compileSdkVersion needs to be 34. Check `android/app/build.gradle` in your Flutter project to change it. - iOS 12+ - Xcode 11.4+ / 12.x - Swift 4.x / 5.x @@ -86,7 +86,7 @@ Add `web3auth_flutter` as a dependency to your `pubspec.yaml` ```yaml dependencies: - web3auth_flutter: ^2.0.3 + web3auth_flutter: ^3.1.0 ``` or @@ -121,15 +121,6 @@ dependencyResolutionManagement { } ``` -Then, in your app-level `build.gradle` dependencies section, add the following: - -```groovy -dependencies { - // highlight-next-line - implementation 'com.github.Web3Auth:web3auth-android-sdk:4.0.8' -} -``` - #### Permissions Open your app's `AndroidManifest.xml` file and add the following permission: @@ -188,16 +179,16 @@ If you are using the Swift Package Manager, open the following menu item in Xcod `File > Swift Packages > Add Package Dependency` -In the Choose Package Repository prompt add this url: +In the Choose Package Repository prompt add this URL: ``` -https://github.com/Web3Auth/web3auth-swift-sdk/releases/tag/6.0.1 +https://github.com/Web3Auth/web3auth-swift-sdk/releases/tag/7.4.0 ``` ##### Cocoapods ```sh -pod 'Web3Auth', '~> 6.0.1' +pod 'Web3Auth', '~> 7.4.0' ``` #### Configuration @@ -242,8 +233,6 @@ void initState() { // Initialization Future initPlatformState() async { - HashMap themeMap = new HashMap(); - themeMap['primary'] = "#fff000"; Uri redirectUrl; if (Platform.isAndroid) { @@ -262,10 +251,12 @@ Future initPlatformState() async { redirectUri: redirectUrl, )); // highlight-end + + await Web3AuthFlutter.initialize(); } ``` -Read more about initialising the Flutter SDK [here](/sdk/pnp/flutter/initialize). +Read more about initializing the Flutter SDK [here](/sdk/pnp/flutter/initialize). ### Authentication @@ -567,7 +558,7 @@ locally yourself! `flutter run` -Also, checkout other examples: +Also, check other examples: - [Using Auth0 Custom Authentication](https://github.com/Web3Auth/web3auth-pnp-examples/tree/main/flutter/flutter-auth0-example) - [Using Custom JWT (via Firebase)](https://github.com/Web3Auth/web3auth-pnp-examples/tree/main/flutter/flutter-firebase-example) diff --git a/src/pages/content-hub/guides/google.mdx b/src/pages/content-hub/guides/google.mdx index 6ec14117b..d9cb4b6eb 100644 --- a/src/pages/content-hub/guides/google.mdx +++ b/src/pages/content-hub/guides/google.mdx @@ -6,7 +6,7 @@ type: guide tags: [web, "@web3auth/no-modal", google, custom authentication, react, ethereum] date: July 18, 2022 author: Web3Auth Team -order: 9 +order: 11 communityPortalTopicId: 54 --- diff --git a/src/pages/content-hub/guides/ios.mdx b/src/pages/content-hub/guides/ios.mdx index cf7383523..b18eda69e 100644 --- a/src/pages/content-hub/guides/ios.mdx +++ b/src/pages/content-hub/guides/ios.mdx @@ -6,7 +6,7 @@ type: guide tags: [mobile, ios, whitelabel, custom authentication, dapp share, swift] date: December 11, 2022 author: Web3Auth Team -order: 8 +order: 10 communityPortalTopicId: 56 --- diff --git a/src/pages/content-hub/guides/react-native-expo-auth0.mdx b/src/pages/content-hub/guides/react-native-expo-auth0.mdx index 8cebbee9d..c78d02166 100644 --- a/src/pages/content-hub/guides/react-native-expo-auth0.mdx +++ b/src/pages/content-hub/guides/react-native-expo-auth0.mdx @@ -6,7 +6,7 @@ type: guide tags: [mobile, react-native, auth0, android, ios, whitelabel, custom authentication, dapp share] date: December 16, 2022 author: Web3Auth Team -order: 13 +order: 12 communityPortalTopicId: 60 --- diff --git a/src/pages/content-hub/guides/react-native-firebase.mdx b/src/pages/content-hub/guides/react-native-firebase.mdx index edd446574..240a3e3ba 100644 --- a/src/pages/content-hub/guides/react-native-firebase.mdx +++ b/src/pages/content-hub/guides/react-native-firebase.mdx @@ -6,7 +6,7 @@ type: guide tags: [mobile, react-native, firebase, android, ios, whitelabel, custom authentication, dapp share] date: December 16, 2022 author: Web3Auth Team -order: 13 +order: 15 communityPortalTopicId: 59 --- diff --git a/src/pages/content-hub/guides/react-native.mdx b/src/pages/content-hub/guides/react-native.mdx index a51f24059..1361c7a7c 100644 --- a/src/pages/content-hub/guides/react-native.mdx +++ b/src/pages/content-hub/guides/react-native.mdx @@ -6,7 +6,7 @@ type: guide tags: [mobile, react-native, android, ios, whitelabel, custom authentication, dapp share] date: December 16, 2022 author: Web3Auth Team -order: 9 +order: 12 communityPortalTopicId: 62 --- diff --git a/src/pages/content-hub/guides/server-side-verification.mdx b/src/pages/content-hub/guides/server-side-verification.mdx index 97dd65312..ba9757222 100644 --- a/src/pages/content-hub/guides/server-side-verification.mdx +++ b/src/pages/content-hub/guides/server-side-verification.mdx @@ -6,7 +6,7 @@ type: guide tags: [ethereum, web3auth core, google, next.js, server side verification] date: July 26, 2022 author: Web3Auth Team -order: 9 +order: 16 communityPortalTopicId: 65 --- diff --git a/src/pages/content-hub/guides/single-factor-auth.mdx b/src/pages/content-hub/guides/single-factor-auth.mdx index 47669e604..2a475d920 100644 --- a/src/pages/content-hub/guides/single-factor-auth.mdx +++ b/src/pages/content-hub/guides/single-factor-auth.mdx @@ -6,7 +6,7 @@ type: guide tags: [web, "@web3auth/single-factor-auth", "@web3auth/no-modal", custom authentication, react, ethereum] date: October 7, 2022 author: Web3Auth Team -order: 6 +order: 5 communityPortalTopicId: 66 --- diff --git a/src/pages/content-hub/guides/tkey-js-mpc.mdx b/src/pages/content-hub/guides/tkey-js-mpc.mdx index deb85233b..456fe262d 100644 --- a/src/pages/content-hub/guides/tkey-js-mpc.mdx +++ b/src/pages/content-hub/guides/tkey-js-mpc.mdx @@ -2,11 +2,11 @@ title: Using Web3Auth tKey MPC SDK image: "content-hub/guides/banners/tkey-mpc.png" description: Learn how to use the Web3Auth tKey JS MPC SDK in your React Application -type: advanced_guide +type: guide tags: [web, corekit, tkey, mpc, google, whitelabel, react, ethereum] date: March 15, 2023 author: Web3Auth Team -order: 5 +order: 17 communityPortalTopicId: 57 --- diff --git a/src/pages/content-hub/guides/tkey-swift-mpc.mdx b/src/pages/content-hub/guides/tkey-swift-mpc.mdx index fe1cf0bea..fb148a351 100644 --- a/src/pages/content-hub/guides/tkey-swift-mpc.mdx +++ b/src/pages/content-hub/guides/tkey-swift-mpc.mdx @@ -2,7 +2,7 @@ title: Using Web3Auth tKey MPC Swift SDK image: "content-hub/guides/banners/ios-mpc.png" description: Learn how to use the Web3Auth MPC Swift SDK in your iOS Application -type: advanced_guide +type: guide tags: [web, corekit, mpc, swift, iOS, ethereum] date: Aug 15, 2023 author: Web3Auth Team diff --git a/src/theme/Footer/index.tsx b/src/theme/Footer/index.tsx index bfc1a4a7b..e4e050d90 100644 --- a/src/theme/Footer/index.tsx +++ b/src/theme/Footer/index.tsx @@ -159,7 +159,7 @@ export default function FooterComponent(): JSX.Element { {/*