Skip to content

Commit

Permalink
update sfa samples
Browse files Browse the repository at this point in the history
  • Loading branch information
AyushBherwani1998 committed Oct 24, 2024
1 parent dd441f8 commit 7a6e9eb
Show file tree
Hide file tree
Showing 10 changed files with 112 additions and 124 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,8 @@ android {

dependencies {
// IMP START - Installation
implementation 'com.github.web3auth:single-factor-auth-android:1.0.0'
// implementation('com.github.web3auth:session-manager-android:5.0.0') {
// exclude group: 'com.github.web3auth', module: 'session-manager-android'
// }
implementation 'com.github.web3auth:session-manager-android:2.4.0'
implementation 'com.github.web3auth:single-factor-auth-android:1.2.0'
// IMP END - Installation
implementation 'org.torusresearch:fetch-node-details-java:5.0.0'
implementation platform('com.google.firebase:firebase-bom:31.0.2')
implementation 'com.google.firebase:firebase-auth-ktx'
implementation 'com.google.code.gson:gson:2.9.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,16 @@ class MainActivity : AppCompatActivity() {
val signOutButton = findViewById<Button>(R.id.signOut)
signOutButton.setOnClickListener { signOut() }

if (singleFactorAuth.isSessionIdExists()) {
try {
torusKey = singleFactorAuth.initialize(this.applicationContext)
publicAddress = torusKey!!.getPublicAddress()
println("""Private Key: ${torusKey!!.getPrivateKey()}""".trimIndent())
reRender()
} catch (e: Exception) {
Log.e("Initalizae Error", e.toString())
}
val torusKeyCF = singleFactorAuth.initialize(this.applicationContext)
torusKeyCF.whenComplete { key, error ->
if (error != null) {
Log.e("Initialize Error", error.toString())
} else {
torusKey = key
publicAddress = torusKey!!.getPublicAddress()
println("""Private Key: ${torusKey!!.getPrivateKey()}""".trimIndent())
reRender()
}
}

reRender()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,10 @@ packages:
dependency: "direct main"
description:
name: single_factor_auth_flutter
sha256: "15f3076a4cc3b43b503326245758f0dfdfd1de35c98335e5a494d6e27af719a0"
sha256: ca914e137e3076ba899975bbf4ca762c2b43369ddc40451762b5b30f26145c1d
url: "https://pub.dev"
source: hosted
version: "5.1.0"
version: "5.2.0"
sky_engine:
dependency: transitive
description: flutter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
get_it: ^8.0.0
http: ^1.2.2
provider: ^6.1.2
single_factor_auth_flutter: ^5.1.0
single_factor_auth_flutter: ^5.2.0
web3dart: ^2.7.3

dev_dependencies:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ class Web3AuthSFA {
// IMP START - Initialize Web3Auth SFA
await singleFactAuthFlutter.init(
SFAParams(
network: Web3AuthNetwork.sapphire_mainnet,
network: Web3AuthNetwork.mainnet,
clientId:
"BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ",
"BJRZ6qdDTbj6Vd5YXvV994TYCqY42-PxldCetmvGTUdoq6pkCqdpuC1DIehz76zuYdaq1RJkXGHuDraHRhCQHvA",
),
);
// IMP END - Initialize Web3Auth SFA
Expand Down
36 changes: 18 additions & 18 deletions single-factor-auth-flutter/sfa_flutter_quick_start/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -164,26 +164,26 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
url: "https://pub.dev"
source: hosted
version: "10.0.5"
version: "10.0.0"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
url: "https://pub.dev"
source: hosted
version: "3.0.5"
version: "2.0.1"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
url: "https://pub.dev"
source: hosted
version: "3.0.1"
version: "2.0.1"
lints:
dependency: transitive
description:
Expand All @@ -204,18 +204,18 @@ packages:
dependency: transitive
description:
name: material_color_utilities
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
url: "https://pub.dev"
source: hosted
version: "0.11.1"
version: "0.8.0"
meta:
dependency: transitive
description:
name: meta
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
url: "https://pub.dev"
source: hosted
version: "1.15.0"
version: "1.11.0"
nested:
dependency: transitive
description:
Expand Down Expand Up @@ -252,10 +252,10 @@ packages:
dependency: "direct main"
description:
name: single_factor_auth_flutter
sha256: "15f3076a4cc3b43b503326245758f0dfdfd1de35c98335e5a494d6e27af719a0"
sha256: ca914e137e3076ba899975bbf4ca762c2b43369ddc40451762b5b30f26145c1d
url: "https://pub.dev"
source: hosted
version: "5.1.0"
version: "5.2.0"
sky_engine:
dependency: transitive
description: flutter
Expand Down Expand Up @@ -305,10 +305,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev"
source: hosted
version: "0.7.2"
version: "0.6.1"
typed_data:
dependency: transitive
description:
Expand All @@ -329,10 +329,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
url: "https://pub.dev"
source: hosted
version: "14.2.5"
version: "13.0.0"
sdks:
dart: ">=3.3.0 <4.0.0"
flutter: ">=3.18.0-18.0.pre.54"
dart: ">=3.2.0-0 <4.0.0"
flutter: ">=3.3.0"
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencies:
firebase_core: ^2.24.2
provider: ^6.1.1
# // IMP START - Installation
single_factor_auth_flutter: ^5.1.0
single_factor_auth_flutter: ^5.2.0
get_it: ^7.6.7
# // IMP END - Installation

Expand Down
85 changes: 40 additions & 45 deletions single-factor-auth-flutter/sfa_flutter_solana/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,32 @@ PODS:
- AppAuth/Core
- BigInt (5.2.0)
- curvelib.swift (1.0.1)
- Firebase/Auth (11.0.0):
- Firebase/Auth (10.25.0):
- Firebase/CoreOnly
- FirebaseAuth (~> 11.0.0)
- Firebase/CoreOnly (11.0.0):
- FirebaseCore (= 11.0.0)
- firebase_auth (5.3.0):
- Firebase/Auth (= 11.0.0)
- FirebaseAuth (~> 10.25.0)
- Firebase/CoreOnly (10.25.0):
- FirebaseCore (= 10.25.0)
- firebase_auth (4.20.0):
- Firebase/Auth (= 10.25.0)
- firebase_core
- Flutter
- firebase_core (3.5.0):
- Firebase/CoreOnly (= 11.0.0)
- firebase_core (2.32.0):
- Firebase/CoreOnly (= 10.25.0)
- Flutter
- FirebaseAppCheckInterop (11.2.0)
- FirebaseAuth (11.0.0):
- FirebaseAppCheckInterop (~> 11.0)
- FirebaseAuthInterop (~> 11.0)
- FirebaseCore (~> 11.0)
- FirebaseCoreExtension (~> 11.0)
- GoogleUtilities/AppDelegateSwizzler (~> 8.0)
- GoogleUtilities/Environment (~> 8.0)
- GTMSessionFetcher/Core (~> 3.4)
- FirebaseAppCheckInterop (10.29.0)
- FirebaseAuth (10.25.0):
- FirebaseAppCheckInterop (~> 10.17)
- FirebaseCore (~> 10.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.8)
- GoogleUtilities/Environment (~> 7.8)
- GTMSessionFetcher/Core (< 4.0, >= 2.1)
- RecaptchaInterop (~> 100.0)
- FirebaseAuthInterop (11.2.0)
- FirebaseCore (11.0.0):
- FirebaseCoreInternal (~> 11.0)
- GoogleUtilities/Environment (~> 8.0)
- GoogleUtilities/Logger (~> 8.0)
- FirebaseCoreExtension (11.2.0):
- FirebaseCore (~> 11.0)
- FirebaseCoreInternal (11.2.0):
- "GoogleUtilities/NSData+zlib (~> 8.0)"
- FirebaseCore (10.25.0):
- FirebaseCoreInternal (~> 10.0)
- GoogleUtilities/Environment (~> 7.12)
- GoogleUtilities/Logger (~> 7.12)
- FirebaseCoreInternal (10.29.0):
- "GoogleUtilities/NSData+zlib (~> 7.8)"
- Flutter (1.0.0)
- google_sign_in_ios (0.0.1):
- Flutter
Expand All @@ -47,32 +42,34 @@ PODS:
- AppAuth (< 2.0, >= 1.7.3)
- GTMAppAuth (< 5.0, >= 4.1.1)
- GTMSessionFetcher/Core (~> 3.3)
- GoogleUtilities/AppDelegateSwizzler (8.0.2):
- GoogleUtilities/AppDelegateSwizzler (7.13.3):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Privacy
- GoogleUtilities/Environment (8.0.2):
- GoogleUtilities/Environment (7.13.3):
- GoogleUtilities/Privacy
- GoogleUtilities/Logger (8.0.2):
- PromisesObjC (< 3.0, >= 1.2)
- GoogleUtilities/Logger (7.13.3):
- GoogleUtilities/Environment
- GoogleUtilities/Privacy
- GoogleUtilities/Network (8.0.2):
- GoogleUtilities/Network (7.13.3):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Privacy
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (8.0.2)":
- "GoogleUtilities/NSData+zlib (7.13.3)":
- GoogleUtilities/Privacy
- GoogleUtilities/Privacy (8.0.2)
- GoogleUtilities/Reachability (8.0.2):
- GoogleUtilities/Privacy (7.13.3)
- GoogleUtilities/Reachability (7.13.3):
- GoogleUtilities/Logger
- GoogleUtilities/Privacy
- GTMAppAuth (4.1.1):
- AppAuth/Core (~> 1.7)
- GTMSessionFetcher/Core (< 4.0, >= 3.3)
- GTMSessionFetcher/Core (3.5.0)
- KeychainSwift (20.0.0)
- PromisesObjC (2.4.0)
- RecaptchaInterop (100.0.0)
- single_factor_auth_flutter (0.0.1):
- Flutter
Expand Down Expand Up @@ -106,15 +103,14 @@ SPEC REPOS:
- Firebase
- FirebaseAppCheckInterop
- FirebaseAuth
- FirebaseAuthInterop
- FirebaseCore
- FirebaseCoreExtension
- FirebaseCoreInternal
- GoogleSignIn
- GoogleUtilities
- GTMAppAuth
- GTMSessionFetcher
- KeychainSwift
- PromisesObjC
- RecaptchaInterop
- SingleFactorAuth
- Torus-fetchNodeDetails
Expand All @@ -137,22 +133,21 @@ SPEC CHECKSUMS:
AppAuth: 501c04eda8a8d11f179dbe8637b7a91bb7e5d2fa
BigInt: f668a80089607f521586bbe29513d708491ef2f7
curvelib.swift: d0746ae82bee34016c06da3567a97e493b3c979f
Firebase: 9f574c08c2396885b5e7e100ed4293d956218af9
firebase_auth: f27287630c4d9e2c3c63e64d9240822ad6b07e5b
firebase_core: 2ec6b789859c7c24766344ec71fdf78639402d56
FirebaseAppCheckInterop: ea21450529cf0ebd132788dd8916a0269abc684f
FirebaseAuth: d5cf28be74d7e82257f6a3f717509eff70d3cf4a
FirebaseAuthInterop: 47c09558af5d1b31f16fb352387c72d4804f4a24
FirebaseCore: 3cf438f431f18c12cdf2aaf64434648b63f7e383
FirebaseCoreExtension: cda74ddfb001224bd8fd1d6e74698b4ed07803de
FirebaseCoreInternal: 0c569513412da9f3b31bd0b340013bbee8f295c5
Firebase: 0312a2352584f782ea56f66d91606891d4607f06
firebase_auth: 5719ddc9f654b813405899480e84971bd8e61235
firebase_core: a626d00494efa398e7c54f25f1454a64c8abf197
FirebaseAppCheckInterop: 6a1757cfd4067d8e00fccd14fcc1b8fd78cfac07
FirebaseAuth: c0f93dcc570c9da2bffb576969d793e95c344fbb
FirebaseCore: 7ec4d0484817f12c3373955bc87762d96842d483
FirebaseCoreInternal: df84dd300b561c27d5571684f389bf60b0a5c934
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
google_sign_in_ios: 989eea5abe94af62050782714daf920be883d4a2
GoogleSignIn: d4281ab6cf21542b1cfaff85c191f230b399d2db
GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d
GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15
GTMAppAuth: f69bd07d68cd3b766125f7e072c45d7340dea0de
GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6
KeychainSwift: 0ce6a4d13f7228054d1a71bb1b500448fb2ab837
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
RecaptchaInterop: 7d1a4a01a6b2cb1610a47ef3f85f0c411434cb21
single_factor_auth_flutter: 9617e5ffce9c0251bddb19cbe49293f921c13b79
SingleFactorAuth: 2bfa8ad0fe8d0023fffdf1a5f0c9634ca3ee66d8
Expand Down
Loading

0 comments on commit 7a6e9eb

Please sign in to comment.