Skip to content

Commit daafeb2

Browse files
committed
Fix sdk + bare example
1 parent 71f4bbb commit daafeb2

File tree

185 files changed

+7264
-124353
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+7264
-124353
lines changed
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,15 @@ local.properties
3131
*.iml
3232
*.hprof
3333
.cxx/
34+
*.keystore
35+
!debug.keystore
3436

3537
# node.js
3638
#
3739
node_modules/
3840
npm-debug.log
3941
yarn-error.log
4042

41-
# BUCK
42-
buck-out/
43-
\.buckd/
44-
*.keystore
45-
!debug.keystore
46-
4743
# fastlane
4844
#
4945
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
@@ -62,3 +58,6 @@ buck-out/
6258
# Ruby / CocoaPods
6359
/ios/Pods/
6460
/vendor/bundle/
61+
62+
# Temporary files created by Metro to check the health of the file watcher
63+
.metro-health-check*

demo/web3uathExample/.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18
Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,16 @@ export default function App() {
3737

3838
setConsole('Logging in');
3939
await web3auth.login({
40-
loginProvider: LOGIN_PROVIDER.GOOGLE,
40+
loginProvider: LOGIN_PROVIDER.EMAIL_PASSWORDLESS,
4141
redirectUrl: resolvedRedirectUrl,
4242
mfaLevel: 'default',
4343
curve: 'secp256k1',
44+
extraLoginOptions: {
45+
login_hint: '[email protected]',
46+
connection: 'email',
47+
},
4448
});
45-
49+
setConsole(`Logged in ${web3auth.privKey}`);
4650
if (web3auth.privKey) {
4751
setUserInfo(web3auth.userInfo());
4852
setKey(web3auth.privKey);
@@ -75,15 +79,7 @@ export default function App() {
7579
clientId,
7680
network: OPENLOGIN_NETWORK.TESTNET, // or other networks
7781
useCoreKitKey: false,
78-
loginConfig: {
79-
google: {
80-
verifier: 'w3a-agg-example',
81-
verifierSubIdentifier: 'w3a-google',
82-
typeOfLogin: 'google',
83-
clientId:
84-
'774338308167-q463s7kpvja16l4l0kko3nb925ikds2p.apps.googleusercontent.com',
85-
},
86-
},
82+
loginConfig: {},
8783
});
8884
setWeb3Auth(auth);
8985
await auth.init();
@@ -104,21 +100,37 @@ export default function App() {
104100
};
105101

106102
const getAccounts = async () => {
103+
if (!key) {
104+
setConsole('User not logged in');
105+
return;
106+
}
107107
setConsole('Getting account');
108108
const address = await RPC.getAccounts(key);
109109
uiConsole(address);
110110
};
111111
const getBalance = async () => {
112+
if (!key) {
113+
setConsole('User not logged in');
114+
return;
115+
}
112116
setConsole('Fetching balance');
113117
const balance = await RPC.getBalance(key);
114118
uiConsole(balance);
115119
};
116120
const sendTransaction = async () => {
121+
if (!key) {
122+
setConsole('User not logged in');
123+
return;
124+
}
117125
setConsole('Sending transaction');
118126
const tx = await RPC.sendTransaction(key);
119127
uiConsole(tx);
120128
};
121129
const signMessage = async () => {
130+
if (!key) {
131+
setConsole('User not logged in');
132+
return;
133+
}
122134
setConsole('Signing message');
123135
const message = await RPC.signMessage(key);
124136
uiConsole(message);
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
source 'https://rubygems.org'
22

33
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4-
ruby '2.7.5'
4+
ruby '>= 2.6.10'
55

6-
gem 'cocoapods', '~> 1.11', '>= 1.11.2'
6+
gem 'cocoapods', '>= 1.11.3'

demo/web3uathExample/Gemfile.lock

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
CFPropertyList (3.0.6)
5+
rexml
6+
activesupport (7.0.5)
7+
concurrent-ruby (~> 1.0, >= 1.0.2)
8+
i18n (>= 1.6, < 2)
9+
minitest (>= 5.1)
10+
tzinfo (~> 2.0)
11+
addressable (2.8.4)
12+
public_suffix (>= 2.0.2, < 6.0)
13+
algoliasearch (1.27.5)
14+
httpclient (~> 2.8, >= 2.8.3)
15+
json (>= 1.5.1)
16+
atomos (0.1.3)
17+
claide (1.1.0)
18+
cocoapods (1.12.1)
19+
addressable (~> 2.8)
20+
claide (>= 1.0.2, < 2.0)
21+
cocoapods-core (= 1.12.1)
22+
cocoapods-deintegrate (>= 1.0.3, < 2.0)
23+
cocoapods-downloader (>= 1.6.0, < 2.0)
24+
cocoapods-plugins (>= 1.0.0, < 2.0)
25+
cocoapods-search (>= 1.0.0, < 2.0)
26+
cocoapods-trunk (>= 1.6.0, < 2.0)
27+
cocoapods-try (>= 1.1.0, < 2.0)
28+
colored2 (~> 3.1)
29+
escape (~> 0.0.4)
30+
fourflusher (>= 2.3.0, < 3.0)
31+
gh_inspector (~> 1.0)
32+
molinillo (~> 0.8.0)
33+
nap (~> 1.0)
34+
ruby-macho (>= 2.3.0, < 3.0)
35+
xcodeproj (>= 1.21.0, < 2.0)
36+
cocoapods-core (1.12.1)
37+
activesupport (>= 5.0, < 8)
38+
addressable (~> 2.8)
39+
algoliasearch (~> 1.0)
40+
concurrent-ruby (~> 1.1)
41+
fuzzy_match (~> 2.0.4)
42+
nap (~> 1.0)
43+
netrc (~> 0.11)
44+
public_suffix (~> 4.0)
45+
typhoeus (~> 1.0)
46+
cocoapods-deintegrate (1.0.5)
47+
cocoapods-downloader (1.6.3)
48+
cocoapods-plugins (1.0.0)
49+
nap
50+
cocoapods-search (1.0.1)
51+
cocoapods-trunk (1.6.0)
52+
nap (>= 0.8, < 2.0)
53+
netrc (~> 0.11)
54+
cocoapods-try (1.2.0)
55+
colored2 (3.1.2)
56+
concurrent-ruby (1.2.2)
57+
escape (0.0.4)
58+
ethon (0.16.0)
59+
ffi (>= 1.15.0)
60+
ffi (1.15.5)
61+
fourflusher (2.3.1)
62+
fuzzy_match (2.0.4)
63+
gh_inspector (1.1.3)
64+
httpclient (2.8.3)
65+
i18n (1.14.1)
66+
concurrent-ruby (~> 1.0)
67+
json (2.6.3)
68+
minitest (5.18.0)
69+
molinillo (0.8.0)
70+
nanaimo (0.3.0)
71+
nap (1.1.0)
72+
netrc (0.11.0)
73+
public_suffix (4.0.7)
74+
rexml (3.2.5)
75+
ruby-macho (2.5.1)
76+
typhoeus (1.4.0)
77+
ethon (>= 0.9.0)
78+
tzinfo (2.0.6)
79+
concurrent-ruby (~> 1.0)
80+
xcodeproj (1.22.0)
81+
CFPropertyList (>= 2.3.3, < 4.0)
82+
atomos (~> 0.1.3)
83+
claide (>= 1.0.2, < 2.0)
84+
colored2 (~> 3.1)
85+
nanaimo (~> 0.3.0)
86+
rexml (~> 3.2.4)
87+
88+
PLATFORMS
89+
ruby
90+
91+
DEPENDENCIES
92+
cocoapods (>= 1.11.3)
93+
94+
RUBY VERSION
95+
ruby 2.7.7p221
96+
97+
BUNDLED WITH
98+
2.3.26
File renamed without changes.

0 commit comments

Comments
 (0)