File tree Expand file tree Collapse file tree 5 files changed +12
-36
lines changed
Expand file tree Collapse file tree 5 files changed +12
-36
lines changed Original file line number Diff line number Diff line change @@ -151,3 +151,4 @@ yarn-error.log
151151build /
152152Pods /
153153.vscode /
154+ .vercel
Original file line number Diff line number Diff line change @@ -26,30 +26,5 @@ Custom authentication examples may require additional environment variables such
2626- ` VITE_AUTH0_CLIENT_ID ` - Your Auth0 Client ID
2727- ` VITE_GOOGLE_CLIENT_ID ` - Your Google OAuth Client ID
2828- ` VITE_FIREBASE_API_KEY ` - Your Firebase API Key
29- - ` VITE_FIREBASE_AUTH_DOMAIN ` - Your Firebase Auth Domain
30- - ` VITE_FIREBASE_PROJECT_ID ` - Your Firebase Project ID
3129
3230Check the individual '.env.example' files in each example directory for the specific environment variables needed.
33-
34- ## Updated Files
35-
36- All examples have been updated to use environment variables instead of hardcoded client IDs. The key files that were modified include:
37-
38- ### Quick Starts
39- - ` quick-starts/react-quick-start/src/web3authContext.tsx `
40- - ` quick-starts/vue-quick-start/src/web3authContext.tsx `
41- - ` quick-starts/vue-solana-quick-start/src/web3authContext.tsx `
42- - ` quick-starts/react-solana-quick-start/src/web3authContext.tsx `
43- - ` quick-starts/nextjs-quick-start/components/provider.tsx `
44- - ` quick-starts/angular-quick-start/src/app/app.component.ts `
45- - ` quick-starts/vanillajs-quick-start/script.js `
46-
47- ### Other Examples
48- - ` other/bitcoin-example/src/web3authContext.tsx `
49- - (All other examples have .env.example files)
50-
51- ### Custom Authentication
52- - ` custom-authentication/single-connection/auth0-implicit-example/src/web3authContext.tsx `
53- - ` custom-authentication/single-connection/auth0-jwt-example/src/index.tsx `
54- - ` custom-authentication/single-connection/google-one-tap-example/src/index.tsx `
55- - (All other examples have .env.example files)
Original file line number Diff line number Diff line change 1+ VITE_WEB3AUTH_CLIENT_ID = YOUR_WEB3AUTH_CLIENT_ID
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ function App() {
2727
2828 { /* Content */ }
2929 < div className = "relative z-10 flex flex-col min-h-screen" >
30- < Web3AuthProvider config = { { web3AuthOptions : web3AuthContextConfig } } >
30+ < Web3AuthProvider config = { web3AuthContextConfig } >
3131 < Playground >
3232 < BrowserRouter >
3333 < Routes >
Original file line number Diff line number Diff line change 1- import { walletServicesPlugin , WEB3AUTH_NETWORK , Web3AuthOptions } from "@web3auth/modal" ;
1+ import { WEB3AUTH_NETWORK } from "@web3auth/modal" ;
2+ import { Web3AuthContextConfig } from "@web3auth/modal/react" ;
23
3- const clientId = "BIpw3vwP0QqF_QecEtEFYxEac6pW7i478ouMUwg-qiWp8ipe-OkD6FUabv99lG0iVO02GWd591bJeiYiM1Sl_Nc" ;
4+ const clientId = import . meta . env . VITE_WEB3AUTH_CLIENT_ID ;
45
5- const web3AuthOptions : Web3AuthOptions = {
6- clientId,
7- web3AuthNetwork : WEB3AUTH_NETWORK . SAPPHIRE_DEVNET ,
8- authBuildEnv : "testing" ,
9- plugins : [ walletServicesPlugin ( ) ] ,
10- uiConfig : {
11- mode : "dark" ,
6+ const web3AuthContextConfig : Web3AuthContextConfig = {
7+ web3AuthOptions : {
8+ clientId,
9+ web3AuthNetwork : WEB3AUTH_NETWORK . SAPPHIRE_MAINNET ,
10+ authBuildEnv : "testing" ,
1211 } ,
1312} ;
1413
15- export default web3AuthOptions ;
14+ export default web3AuthContextConfig ;
You can’t perform that action at this time.
0 commit comments