Skip to content

Commit 3423267

Browse files
committed
iframe initial setup
1 parent 0e42f33 commit 3423267

File tree

14 files changed

+1450
-107
lines changed

14 files changed

+1450
-107
lines changed

examples/vue-example/package-lock.json

Lines changed: 30 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/vue-example/src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ const login = async () => {
888888
console.log(openLoginObj, "OPENLOGIN");
889889
const startTime = Date.now();
890890
if (selectedUxMode.value === "redirect") sessionStorage.setItem("startTime", startTime.toString());
891-
await openloginInstance.value.login(openLoginObj);
891+
await openloginInstance.value.loginWithSocial(openLoginObj);
892892
if (openloginInstance.value.privKey || openloginInstance.value.state.walletKey) {
893893
const loginTime = (Date.now() - startTime) / 1000;
894894
console.log("Login time", `${loginTime}s`);

package-lock.json

Lines changed: 51 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132
"bn.js": "^5.2.1",
133133
"bowser": "^2.11.0",
134134
"color": "^4.2.3",
135+
"deepmerge": "^4.3.1",
135136
"enc-utils": "^3.0.0",
136137
"end-of-stream": "^1.4.4",
137138
"events": "^3.3.0",

src/config/config-build.ts

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import { LogLevelDesc } from "loglevel";
2+
3+
import {
4+
AUTH_SERVER_URL,
5+
BUILD_ENV,
6+
DEVELOP_AUTH_SERVER_URL,
7+
DEVELOP_PASSWORDLESS_SERVER_API_URL,
8+
PASSWORDLESS_SERVER_API_URL,
9+
} from "../utils/constants";
10+
import { BUILD_ENV_TYPE } from "../utils/interfaces";
11+
12+
export interface ConfigBuild {
13+
// add discord revoke api in backend
14+
apiHost: string; // auth backend
15+
passwordlessBackendHost: string;
16+
passwordlessHost: string;
17+
sentrySampleRate: string;
18+
sentryTransactionSampleRate: string;
19+
supportsVersioning: boolean;
20+
logLevel: LogLevelDesc;
21+
}
22+
23+
const configBuild: Record<BUILD_ENV_TYPE, ConfigBuild> = {
24+
[BUILD_ENV.DEVELOPMENT]: {
25+
apiHost: `${DEVELOP_AUTH_SERVER_URL}`,
26+
logLevel: "debug",
27+
passwordlessBackendHost: `${DEVELOP_PASSWORDLESS_SERVER_API_URL}/api/v3/`,
28+
passwordlessHost: "https://develop-passwordless.web3auth.io",
29+
sentrySampleRate: "0",
30+
sentryTransactionSampleRate: "0",
31+
supportsVersioning: false,
32+
},
33+
[BUILD_ENV.STAGING]: {
34+
apiHost: AUTH_SERVER_URL,
35+
logLevel: "debug",
36+
passwordlessBackendHost: `${PASSWORDLESS_SERVER_API_URL}/api/v3/`,
37+
passwordlessHost: "https://staging-passwordless.web3auth.io/v6",
38+
sentrySampleRate: "0.1",
39+
sentryTransactionSampleRate: "0.1",
40+
supportsVersioning: true,
41+
},
42+
[BUILD_ENV.PRODUCTION]: {
43+
apiHost: AUTH_SERVER_URL,
44+
logLevel: "error",
45+
passwordlessBackendHost: `${PASSWORDLESS_SERVER_API_URL}/api/v3/`,
46+
passwordlessHost: "https://passwordless.web3auth.io/v6",
47+
sentrySampleRate: "0.5",
48+
sentryTransactionSampleRate: "0.001",
49+
supportsVersioning: true,
50+
},
51+
[BUILD_ENV.TESTING]: {
52+
apiHost: DEVELOP_AUTH_SERVER_URL,
53+
logLevel: "debug",
54+
passwordlessBackendHost: `${DEVELOP_PASSWORDLESS_SERVER_API_URL}/api/v3/`,
55+
passwordlessHost: "https://develop-passwordless.web3auth.io",
56+
sentrySampleRate: "1",
57+
sentryTransactionSampleRate: "0.1",
58+
supportsVersioning: false,
59+
},
60+
};
61+
62+
export default configBuild;

0 commit comments

Comments
 (0)