Open salgozino opened 2 months ago
Name | Link |
---|---|
Latest commit | f1a7943bbac05063f63ddc87e3cc9f3b5b029c55 |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-testnet/deploys/66d5e969d1dd5d000899b4f0 |
Deploy Preview | https://deploy-preview-1679--kleros-v2-testnet.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Name | Link |
---|---|
Latest commit | f1a7943bbac05063f63ddc87e3cc9f3b5b029c55 |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-university/deploys/66d5e9699451250008406d16 |
Name | Link |
---|---|
Latest commit | f1a7943bbac05063f63ddc87e3cc9f3b5b029c55 |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-neo/deploys/66d5e9693b67960008a4b0d2 |
Deploy Preview | https://deploy-preview-1679--kleros-v2-neo.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
The changes introduce several new features and modifications across various files in the application. Notably, new environment variables for GraphQL API connections are added, and the authentication logic is refactored to utilize a context provider. Several new utility functions for user management are introduced, enhancing the application's interaction with a GraphQL backend. Additionally, modifications to existing components streamline logic and improve code organization.
Files | Change Summary |
---|---|
web/.env.* |
Added REACT_APP_ATLAS_URI environment variable set to http://localhost:3000/graphql . |
web/netlify/middleware/authMiddleware.ts |
Removed issuer and audience variables from JWT verification logic. |
web/package.json |
Added Web3 authentication dependencies and downgraded viem package version. |
web/src/app.tsx |
Introduced AtlasProvider to enhance context management in the component hierarchy. |
web/src/components/EnsureAuth.tsx |
Simplified authentication logic using useAtlasProvider context; removed local state. |
web/src/consts/index.ts |
Updated EMAIL_REGEX to a more comprehensive pattern for email validation. |
web/src/context/AtlasProvider.tsx |
Implemented AtlasProvider for user authentication and data interactions with Atlas backend. |
web/src/context/Web3Provider.tsx |
Enhanced Web3 authentication setup with new imports and configurations. |
web/src/hooks/useSessionStorage.ts |
Changed storage from localStorage to sessionStorage . |
web/src/layout/Header/navbar/Menu/Settings/Notifications/... |
Refactored user management logic to utilize useAtlasProvider for email handling. |
web/src/utils/atlas/*.ts |
Introduced several utility functions for user management (e.g., addUser , fetchUser ). |
web/src/utils/uploadFormDataToIPFS.ts |
Renamed session storage key from "auth-token" to "authToken" . |
sequenceDiagram
participant User
participant App
participant AtlasProvider
participant GraphQLAPI
User->>App: Initiates authentication
App->>AtlasProvider: Calls authoriseUser
AtlasProvider->>GraphQLAPI: Sends authentication request
GraphQLAPI-->>AtlasProvider: Returns access token
AtlasProvider-->>App: Provides user data
App-->>User: Displays user information
π° Hopping through the code, oh what a delight,
New paths to explore, everything feels right!
With Atlas in tow, we leap and we bound,
In a world of GraphQL, new treasures are found.
So letβs dance and rejoice, with a hop and a cheer,
For the changes weβve made, letβs celebrate here! π
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Issues
9 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Code Climate has analyzed commit f1a7943b and detected 21 issues on this pull request.
Here's the issue category breakdown:
Category | Count |
---|---|
Complexity | 1 |
Duplication | 2 |
Style | 18 |
View more on Code Climate.
Only 4 file changes after changing the base branch to feat/atlas-siwe :)
This PR inclues Web3Auth as a login method to enable social logins.
This connector allow users to login with their email (or facebook, github, etc) to kleros court. Behind the scenes a wallet is created and all the txs signs are handled without interaction from the user.
I don't think that this is a great wallet considering safety, or transparency of the txs that you are making, but will be great to onboard new jurors without crypto knowleadge and remove some frictions in the onboarding. For example, when you perform a stake, or approval or whatever, there is no popup to sign or nothing like that, all the transactions are signed automatically. This creates a "web2"experience, and I think that is great for users without crypto knowleadge. We can include in the docs or somewhere some disclaimers abourt not having a lot of money on that wallet).
Web3Auth is not free, but in the free plan there are until 1000 monthly active users.
This is very draft and more a PoC than a PR to be merged. Opening here to be discussed.
PR-Codex overview
This PR focuses on restructuring API calls and environment variables for better functionality and security.
Detailed summary
Summary by CodeRabbit
New Features
REACT_APP_ATLAS_URI
for local GraphQL API connections across multiple configuration files.AtlasProvider
for enhanced user authentication and data interactions.Improvements
EnsureAuth
component.FormContactDetails
component.Bug Fixes
Documentation