-
Notifications
You must be signed in to change notification settings - Fork 1
/
okey.ts
28 lines (23 loc) · 894 Bytes
/
okey.ts
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
import OnlySocialKey from '@oraichain/only-social-key';
import OraiServiceProvider from '@oraichain/service-provider-orai';
import OraiStorageLayer from '@oraichain/storage-layer-orai';
import { CustomAuthArgs, metadataUrl, Network } from '@oraichain/customauth';
import Multifactors from '@oraichain/multifactors.js';
const isProduction = false;
const network_v1 = isProduction ? Network.MAINNET : Network.STAGING;
const endpoint_v1 = metadataUrl[network_v1];
const multifactors: Multifactors = new Multifactors({});
const customAuthArgs: CustomAuthArgs = {
baseUrl: 'http://localhost/serviceworker',
network: network_v1,
multifactors
};
export const OnlySocialLoginKeyV1 = new OnlySocialKey({
serviceProvider: new OraiServiceProvider({
customAuthArgs
}),
storageLayer: new OraiStorageLayer({
hostUrl: endpoint_v1
})
});
global.onlySocialKey = OnlySocialLoginKeyV1;