This PR integrates Web3 authentication using NextAuth.js and Cometh Connect. The changes include:
Key Features
Implemented NextAuth.js for session management
Added Web3 credential provider for Ethereum wallet authentication
Integrated Cometh Connect for wallet interactions
Created API routes for nonce generation and signature verification
Updated database schema to support Web3 authentication
Technical Details
Added new dependencies: next-auth, @next-auth/prisma-adapter, ethers, zod
Created new API routes for NextAuth and Web3 authentication
Implemented custom credential provider for Web3 authentication
Updated Prisma schema to include new models for NextAuth and nonce storage
Modified MuqaConnectButton to support Web3 sign-in/sign-out flow
Added session provider to the app layout
Configuration Changes
Updated .env.example with new environment variables
Modified tsconfig.json to include new path aliases
Other Changes
Updated various package.json files with new scripts and dependencies
Refactored some existing components to support the new authentication flow
Database Reset Required
Important: Due to significant changes in the database schema, a complete reset of the development database is necessary. Please follow these steps after merging:
Drop the existing database
Run migrations to create the new schema
Re-seed the database if necessary
Testing
This feature is currently only enabled in development mode
Thorough testing is required to ensure smooth integration with existing features
Please review the changes carefully, especially the authentication flow and database modifications. Ensure that the database reset process is performed in all development environments to avoid inconsistencies.
This PR integrates Web3 authentication using NextAuth.js and Cometh Connect. The changes include:
Key Features
Technical Details
next-auth
,@next-auth/prisma-adapter
,ethers
,zod
MuqaConnectButton
to support Web3 sign-in/sign-out flowConfiguration Changes
.env.example
with new environment variablestsconfig.json
to include new path aliasesOther Changes
Database Reset Required
Important: Due to significant changes in the database schema, a complete reset of the development database is necessary. Please follow these steps after merging:
Testing
Please review the changes carefully, especially the authentication flow and database modifications. Ensure that the database reset process is performed in all development environments to avoid inconsistencies.