Skip to content

Commit fae1a7a

Browse files
author
Guru
committed
fix: build
1 parent 0c3ec05 commit fae1a7a

File tree

7 files changed

+72
-16
lines changed

7 files changed

+72
-16
lines changed

demo/redirect-flow-example/package-lock.json

Lines changed: 57 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/redirect-flow-example/package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@
3535
"react-router-dom": "^7.0.2",
3636
"tailwind-merge": "^2.5.2",
3737
"typescript": "^5.6.3",
38-
"web3": "^4.13.0"
38+
"web3": "^4.13.0",
39+
"workbox-core": "^7.3.0",
40+
"workbox-expiration": "^7.3.0",
41+
"workbox-precaching": "^7.3.0",
42+
"workbox-routing": "^7.3.0",
43+
"workbox-strategies": "^7.3.0"
3944
},
4045
"scripts": {
4146
"start": "vite",
@@ -88,11 +93,11 @@
8893
"os-browserify": "^0.3.0",
8994
"path-browserify": "^1.0.1",
9095
"postcss": "^8.4.49",
91-
"tailwindcss": "^3.4.16",
9296
"prettier-plugin-tailwindcss": "^0.5.14",
9397
"process": "^0.11.10",
9498
"stream-browserify": "^3.0.0",
9599
"stream-http": "^3.2.0",
100+
"tailwindcss": "^3.4.16",
96101
"url": "^0.11.4"
97102
}
98103
}

demo/redirect-flow-example/src/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,11 @@ function App() {
245245

246246
// IMP START - Login
247247
const verifierConfig = {
248-
aggregateVerifierIdentifier: "web-aggregate-core-kit",
248+
aggregateVerifierIdentifier: "aggregate-sapphire",
249249
subVerifierDetailsArray: [
250250
{
251251
typeOfLogin: "jwt",
252-
verifier: "web3-aggregate-passwordless",
252+
verifier: "w3a-a0-email-passwordless",
253253
clientId: "QiEf8qZ9IoasbZsbHvjKZku4LdnRC1Ct",
254254
jwtParams: {
255255
// connection: "passwordless",

demo/redirect-flow-example/src/components/useSocialLogin.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,7 @@ import { LOGIN_PROVIDER, SocialLoginObj } from "./types";
44
const useSocialLogins = (): SocialLoginObj[] => {
55

66
const socialLoginsAll = useMemo((): SocialLoginObj[] => {
7-
const loginProviders = Object.values(LOGIN_PROVIDER).filter(
8-
(x) =>
9-
x !== LOGIN_PROVIDER.EMAIL_PASSWORDLESS &&
10-
x !== LOGIN_PROVIDER.SMS_PASSWORDLESS &&
11-
x !== LOGIN_PROVIDER.WEIBO &&
12-
x !== LOGIN_PROVIDER.WEBAUTHN &&
13-
x !== LOGIN_PROVIDER.JWT
14-
);
7+
const loginProviders = Object.values(LOGIN_PROVIDER);
158
return loginProviders.map((loginProvider) => ({
169
description: loginProvider === LOGIN_PROVIDER.GOOGLE ? "Continue with Google" : "",
1710
icon: loginProvider,

demo/redirect-flow-example/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ root.render(
3636
// If you want your app to work offline and load faster, you can change
3737
// unregister() to register() below. Note this comes with some pitfalls.
3838
// Learn more about service workers: https://cra.link/PWA
39-
serviceWorkerRegistration.register();
39+
serviceWorkerRegistration.unregister();

demo/redirect-flow-example/src/service-worker.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ import { precacheAndRoute, createHandlerBoundToURL } from 'workbox-precaching';
1414
import { registerRoute } from 'workbox-routing';
1515
import { StaleWhileRevalidate } from 'workbox-strategies';
1616

17-
declare const self: ServiceWorkerGlobalScope;
17+
declare const self: ServiceWorkerGlobalScope & {
18+
__WB_MANIFEST: Array<{ url: string; revision: string }>;
19+
};
1820

1921
clientsClaim();
2022

demo/redirect-flow-example/src/serviceWorkerRegistration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ type Config = {
2626
export function register(config?: Config) {
2727
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
2828
// The URL constructor is available in all browsers that support SW.
29-
const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);
29+
const publicUrl = new URL(process.env.PUBLIC_URL || '', window.location.href);
3030
if (publicUrl.origin !== window.location.origin) {
3131
// Our service worker won't work if PUBLIC_URL is on a different origin
3232
// from what our page is served on. This might happen if a CDN is used to

0 commit comments

Comments
 (0)