-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathww-config.js
129 lines (129 loc) · 4.3 KB
/
ww-config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
export default {
editor: {
label: {
en: 'Auth0 - Web3',
},
settings: [
{
label: 'Auth0 Configuration',
icon: 'advanced',
edit: () => import('./src/components/Configuration/Auth0SettingsEdit.vue'),
summary: () => import('./src/components/Configuration/Auth0SettingsSummary.vue'),
getIsValid(settings) {
const { auth0_domain, auth0_audienceURL } = settings.publicData;
const { auth0_clientId } = settings.publicData;
return !!auth0_domain && !!auth0_clientId && !!auth0_audienceURL;
},
},
{
label: 'Define redirections (URLs)',
icon: 'open-out',
edit: () => import('./src/components/Redirections/SettingsEdit.vue'),
summary: () => import('./src/components/Redirections/SettingsSummary.vue'),
getIsValid(settings) {
const { redirectPageId, afterLoginPageId, afterLogoutPageId } = settings.publicData;
return !!redirectPageId && !!afterLoginPageId && !!afterLogoutPageId;
},
},
{
label: 'Web3 Configuration',
icon: 'advanced',
edit: () => import('./src/components/Configuration/Web3SettingsEdit.vue'),
summary: () => import('./src/components/Configuration/Web3SettingsSummary.vue'),
getIsValid(settings) {
const { web3_clientId, web3_verifierName } = settings.publicData;
return !!web3_clientId && !!web3_verifierName;
},
},
],
},
properties: {
web3_Accounts: {
label: {
en: 'Web3 Accounts',
},
type: 'Variable',
options: {
types: ['Array'],
},
bindable: true,
},
},
variables: [
{ name: 'auth0_user', value: 'user', type: 'object', defaultValue: null },
{ name: 'auth0_jwt', value: 'token', type: 'accessToken', defaultValue: null },
{ name: 'web3_instance', value: 'web3Instance', type: 'object', defaultValue: null },
{ name: 'web3_jwt', value: 'token', type: 'accessToken', defaultValue: null },
{ name: 'web3_user', value: 'user', type: 'object', defaultValue: null },
{ name: 'isAuthenticated', value: 'isAuthenticated', type: 'boolean', defaultValue: false },
{ name: 'web3_accounts', value: 'accounts', type: 'array', defaultValue: [] },
],
actions: [
/**
* Auth0 actions
*/
{
name: 'Google Login with Redirect',
code: 'googleLoginWithRedirect',
isAsync: true,
},
{
name: 'Apple Login with Redirect',
code: 'appleLoginWithRedirect',
isAsync: true,
},
{
name: 'Facebook Login with Redirect',
code: 'facebookLoginWithRedirect',
isAsync: true,
},
{
name: 'Logout web3 and Auth0',
code: 'logout',
isAsync: true,
},
{
name: 'Renew Auth0 idToken',
code: 'renewSession',
isAsync: true,
},
/**
* web3 actions
*/
{
name: 'Web3 - Connect to Wallet',
code: 'web3_connectToWallet',
isAsync: true,
},
{
name: 'Web3 - Get Web3 User Info',
code: 'web3_getUserInfo',
isAsync: true,
},
{
name: 'Web3 - Get Accounts',
code: 'web3_getWalletAddress',
isAsync: true,
},
{
name: 'Web3 - Update Wallet Id',
code: 'web3_updateWalletId',
isAsync: true,
},
{
name: 'Web3 - Get Balance',
code: 'web3_getBalance',
isAsync: true,
},
{
name: 'Web3 - Sign Eth Message',
code: 'web3_signEthMessage',
isAsync: true,
},
{
name: 'Web3 - Send Eth',
code: 'web3_sendTransaction',
isAsync: true,
},
],
};