Skip to content

Commit c6ad057

Browse files
committed
Add env variable based config to all
1 parent 23e1668 commit c6ad057

File tree

98 files changed

+305
-274
lines changed

Some content is hidden

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

98 files changed

+305
-274
lines changed

ENV_SETUP.md

Lines changed: 55 additions & 0 deletions

README.md

Lines changed: 10 additions & 1 deletion
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VITE_WEB3AUTH_CLIENT_ID=YOUR_WEB3AUTH_CLIENT_ID

custom-authentication/grouped-connection/auth0-google-implicit-grouped-example/src/web3authContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { WEB3AUTH_NETWORK, type Web3AuthOptions } from "@web3auth/modal";
22

33
// Dashboard Registration
4-
const clientId = "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ"; // get from https://dashboard.web3auth.io
4+
const clientId = import.meta.env.VITE_WEB3AUTH_CLIENT_ID || ""; // get from https://dashboard.web3auth.io
55

66

77
// Instantiate SDK
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
VITE_WEB3AUTH_CLIENT_ID=YOUR_WEB3AUTH_CLIENT_ID
2+
VITE_GOOGLE_CLIENT_ID=YOUR_GOOGLE_CLIENT_ID
3+
VITE_AUTH0_CLIENT_ID=YOUR_AUTH0_CLIENT_ID

custom-authentication/grouped-connection/auth0-google-jwt-grouped-example/src/App.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { SendTransaction } from "./components/sendTransaction";
66
import { Balance } from "./components/getBalance";
77
import { SwitchChain } from "./components/switchNetwork";
88
import { useAuth0 } from "@auth0/auth0-react";
9-
import { GoogleLogin, CredentialResponse, googleLogout } from "@react-oauth/google";
9+
import { GoogleLogin, CredentialResponse } from "@react-oauth/google";
1010

1111
function App() {
1212
const { connectTo, isConnected, connectorName, loading: connectLoading, error: connectError } = useWeb3AuthConnect();
@@ -25,6 +25,7 @@ function App() {
2525
idToken,
2626
extraLoginOptions: {
2727
isUserIdCaseSensitive: false,
28+
verifierIdField: "email",
2829
},
2930
});
3031
};

custom-authentication/grouped-connection/auth0-google-jwt-grouped-example/src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ root.render(
2020
<Web3AuthProvider config={web3AuthContextConfig}>
2121
<QueryClientProvider client={queryClient}>
2222
<WagmiProvider>
23-
<GoogleOAuthProvider clientId="461819774167-5iv443bdf5a6pnr2drt4tubaph270obl.apps.googleusercontent.com">
23+
<GoogleOAuthProvider clientId={import.meta.env.VITE_GOOGLE_CLIENT_ID}>
2424
<Auth0Provider
2525
domain="web3auth.au.auth0.com"
26-
clientId="hiLqaop0amgzCC0AXo4w0rrG9abuJTdu"
26+
clientId={import.meta.env.VITE_AUTH0_CLIENT_ID}
2727
authorizationParams={{
2828
redirect_uri: window.location.origin,
2929
}}

custom-authentication/grouped-connection/auth0-google-jwt-grouped-example/src/web3authContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { WEB3AUTH_NETWORK, type Web3AuthOptions } from "@web3auth/modal";
22

33
// Dashboard Registration
4-
const clientId = "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ"; // get from https://dashboard.web3auth.io
4+
const clientId = import.meta.env.VITE_WEB3AUTH_CLIENT_ID || ""; // get from https://dashboard.web3auth.io
55

66

77
// Instantiate SDK
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
VITE_WEB3AUTH_CLIENT_ID=YOUR_WEB3AUTH_CLIENT_ID
2+
VITE_GOOGLE_CLIENT_ID=YOUR_GOOGLE_CLIENT_ID

custom-authentication/grouped-connection/firebase-google-jwt-grouped-example/src/App.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ import { GoogleLogin, CredentialResponse } from "@react-oauth/google";
1111

1212
// Your web app's Firebase configuration
1313
const firebaseConfig = {
14-
apiKey: "AIzaSyAAAF-xdPur0wJpgwXLGdLZWDwRCTRLdX8",
15-
authDomain: "web3auth-firebase-github.firebaseapp.com",
16-
projectId: "web3auth-firebase-github",
17-
storageBucket: "web3auth-firebase-github.appspot.com",
18-
messagingSenderId: "384159528034",
19-
appId: "1:384159528034:web:9a9121481ea2948237cd3b",
14+
apiKey: "AIzaSyB0nd9YsPLu-tpdCrsXn8wgsWVAiYEpQ_E",
15+
authDomain: "web3auth-oauth-logins.firebaseapp.com",
16+
projectId: "web3auth-oauth-logins",
17+
storageBucket: "web3auth-oauth-logins.appspot.com",
18+
messagingSenderId: "461819774167",
19+
appId: "1:461819774167:web:e74addfb6cc88f3b5b9c92",
2020
};
2121

2222
function App() {

0 commit comments

Comments
 (0)