Skip to content

Commit

Permalink
Update Flutter guides + fix broken link
Browse files Browse the repository at this point in the history
  • Loading branch information
shahbaz17 committed Nov 9, 2023
1 parent db9c622 commit 534fb64
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 82 deletions.
8 changes: 4 additions & 4 deletions docs/connect-blockchain/algorand.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
15 changes: 8 additions & 7 deletions src/common/sdk/pnp/android/_response.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
{
"privKey": "0ajjsdsd....",
"userInfo": {
"name": "John Dash",
"email": "[email protected]",
"name": "Web3Auth Heroes",
"profileImage": "https://lh3.googleusercontent.com/a/Ajjjsdsmdjmnm...",
"typeOfLogin": "google",
"aggregateVerifier": "tkey-google",
"verifier": "torus",
"verifierId": "[email protected]",
"email": "[email protected]",
"dappShare": "<24 words seed phrase>", // will be sent only incase of custom verifiers
"verifierId": "[email protected]",
"typeOfLogin": "google",
"aggregateVerifier": "w3a-google-sapphire",
"dappShare": "", // 24 words of seed phrase will be sent only incase of custom verifiers
"idToken": "<jwtToken issued by Web3Auth>",
"oAuthIdToken": "<jwtToken issued by OAuth Provider>", // will be sent only incase of custom verifiers
"oAuthAccessToken": "<accessToken issued by OAuth Provider>" // will be sent only incase of custom verifiers
"oAuthAccessToken": "<accessToken issued by OAuth Provider>", // will be sent only incase of custom verifiers
"isMfaEnabled": false // Returns whether the user has enabled MFA or not
},
"ed25519PrivKey": "666523652352635....",
"coreKitKey": "0xajjsdsd....",
Expand Down
15 changes: 8 additions & 7 deletions src/common/sdk/pnp/flutter/_response.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
{
"privKey": "0ajjsdsd....",
"userInfo": {
"name": "John Dash",
"email": "[email protected]",
"name": "Web3Auth Heroes",
"profileImage": "https://lh3.googleusercontent.com/a/Ajjjsdsmdjmnm...",
"typeOfLogin": "google",
"aggregateVerifier": "tkey-google",
"verifier": "torus",
"verifierId": "[email protected]",
"email": "[email protected]",
"dappShare": "<24 words seed phrase>", // will be sent only incase of custom verifiers
"verifierId": "[email protected]",
"typeOfLogin": "google",
"aggregateVerifier": "w3a-google-sapphire",
"dappShare": "", // 24 words of seed phrase will be sent only incase of custom verifiers
"idToken": "<jwtToken issued by Web3Auth>",
"oAuthIdToken": "<jwtToken issued by OAuth Provider>", // will be sent only incase of custom verifiers
"oAuthAccessToken": "<accessToken issued by OAuth Provider>" // will be sent only incase of custom verifiers
"oAuthAccessToken": "<accessToken issued by OAuth Provider>", // will be sent only incase of custom verifiers
"isMfaEnabled": false // Returns whether the user has enabled MFA or not
},
"ed25519PrivKey": "666523652352635....",
"coreKitKey": "0xajjsdsd....",
Expand Down
22 changes: 13 additions & 9 deletions src/common/sdk/pnp/ios/_response.mdx
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
```json
{
"ed25519PrivKey": "666523652352635....",
"privKey": "0ajjsdsd....",
"userInfo": {
"aggregateVerifier": "tkey-google",
"email": "[email protected]",
"name": "John Dash",
"email": "[email protected]",
"name": "Web3Auth Heroes",
"profileImage": "https://lh3.googleusercontent.com/a/Ajjjsdsmdjmnm...",
"typeOfLogin": "google",
"verifier": "torus",
"verifierId": "[email protected]",
"dappShare": "<24 words seed phrase>", // will be sent only incase of custom verifiers
"verifierId": "[email protected]",
"typeOfLogin": "google",
"aggregateVerifier": "w3a-google-sapphire",
"dappShare": "", // 24 words of seed phrase will be sent only incase of custom verifiers
"idToken": "<jwtToken issued by Web3Auth>",
"oAuthIdToken": "<jwtToken issued by OAuth Provider>", // will be sent only incase of custom verifiers
"oAuthAccessToken": "<accessToken issued by OAuth Provider>" // will be sent only incase of custom verifiers
}
"oAuthAccessToken": "<accessToken issued by OAuth Provider>", // 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...."
}
```
29 changes: 10 additions & 19 deletions src/pages/content-hub/guides/flutter-auth0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ When integrating Web3Auth Flutter SDK with Social Login the flow looks something
<Web3AuthPrerequisites />

- 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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -378,8 +369,6 @@ void initState() {
// Initialization
Future<void> initPlatformState() async {
HashMap themeMap = new HashMap<String, String>();
themeMap['primary'] = "#fff000";
Uri redirectUrl;
if (Platform.isAndroid) {
Expand Down Expand Up @@ -407,10 +396,12 @@ Future<void> 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

Expand Down Expand Up @@ -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)**.

:::

Expand Down Expand Up @@ -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)
Expand Down
27 changes: 9 additions & 18 deletions src/pages/content-hub/guides/flutter-firebase.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -254,8 +245,6 @@ void initState() {
// Initialization
Future<void> initPlatformState() async {
HashMap themeMap = new HashMap<String, String>();
themeMap['primary'] = "#fff000";
Uri redirectUrl;
if (Platform.isAndroid) {
Expand Down Expand Up @@ -283,10 +272,12 @@ Future<void> 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

Expand Down Expand Up @@ -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)
Expand Down
27 changes: 9 additions & 18 deletions src/pages/content-hub/guides/flutter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ When integrating Web3Auth Flutter SDK with Social Login the flow looks something
<Web3AuthPrerequisites />

- 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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -242,8 +233,6 @@ void initState() {
// Initialization
Future<void> initPlatformState() async {
HashMap themeMap = new HashMap<String, String>();
themeMap['primary'] = "#fff000";
Uri redirectUrl;
if (Platform.isAndroid) {
Expand All @@ -262,10 +251,12 @@ Future<void> 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

Expand Down Expand Up @@ -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)
Expand Down

1 comment on commit 534fb64

@vercel
Copy link

@vercel vercel bot commented on 534fb64 Nov 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

web3auth-docs – ./

web3auth-docs-web3auth.vercel.app
web3auth-docs-git-master-web3auth.vercel.app
w3a-docs.vercel.app

Please sign in to comment.