Web3 auth via JWTs for Sveltekit
The Sveltekit + Web3auth project aims to integrate web3auth via MetaMask with a JWT Issuing auth server from a confidential client for use with APIs in Sveltekit. This integration allows for a seamless login process, with navigation to protected pages of the app not requiring a request to the Authorization Server. Sveltekit hooks take care of the client-side implementation, ensuring a smooth user experience.
npm ci in the project directory..env file in the project root directory and add the following content:VITE_WEB3AUTH_CLIENT_SECRET=[your_client_secret]
src/routes/auth folder, src/config folder, src/hooks.ts file, and src/routes/__layout.svelte file from the sveltekit-web3auth source repository to the corresponding locations in your own SvelteKit project.$lib with sveltekit-web3auth.routes/graphql and routes/profile folders from the source repository to your own project and customize them as needed.The Sveltekit + Web3auth project provides a seamless integration of web3auth via MetaMask with a JWT Issuing auth server, enabling secure authentication within an API-driven Sveltekit application. The use of Sveltekit hooks simplifies the client-side implementation, ensuring a smooth and user-friendly login process. With easy-to-follow installation instructions, developers can quickly get started with this project and customize it to fit their specific requirements.