Closed Harman-singh-waraich closed 2 weeks ago
[!CAUTION]
Review failed
The pull request is closed.
The recent updates introduce a comprehensive user authentication management system through the implementation of the AtlasProvider
, which facilitates interactions with an Atlas API. A new EmailConfirmation
component has been added to handle the email verification process. Additionally, utility functions for confirming emails and fetching user data have been introduced, enhancing state management and streamlining user interactions. Several files related to IPFS uploads and authentication middleware have been removed, reflecting a shift in the project's architecture.
File | Change Summary |
---|---|
web/src/context/AtlasProvider.tsx | Implemented AtlasProvider for user authentication and session management. Added IAtlasProvider interface and useAtlasProvider hook. |
web/src/pages/Settings/EmailConfirmation/index.tsx | Added EmailConfirmation component for handling email verification using query parameters. |
web/src/utils/atlas/confirmEmail.ts | Introduced confirmEmail function with GraphQL mutation for email confirmation. Added types ConfirmEmailData and ConfirmEmailResponse . |
web/src/utils/atlas/fetchUser.ts | Added fetchUser function to retrieve user data via GraphQL, including types GetUserResponse and User . |
web/src/utils/atlas/index.ts | Updated to re-export uploadToIpfs along with other user management functionalities. |
web/src/utils/atlas/uploadToIpfs.ts | Introduced functionality for uploading files to IPFS, including enumerations and structured payload types. |
web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/EmailVerificationInfo.tsx | Added EmailVerificationInfo component to display email verification status and resend verification email. Introduced IEmailInfo interface. |
web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/index.tsx | Modified FormContactDetails component to use useAtlasProvider for user settings management, simplifying logic and integrating email update functionality. |
web/package.json | Updated project version to 0.2.0 , removed generate:supabase script, and updated dependencies. |
web/.env.* | Added REACT_APP_ATLAS_URI environment variable to multiple .env files. |
web/netlify/functions/uploadToIPFS.ts, web/netlify/middleware/authMiddleware.ts | Deleted files related to IPFS upload functionality and authentication middleware. |
AtlasProvider
context, which is directly related to user authentication and email confirmation, similar to the main PR's focus on user session management and email confirmation processes.uploadFile
method to the AtlasProvider
, which is relevant to the main PR's changes involving file uploads to IPFS and user-related functionalities.REACT_APP_ATLAS_URI
variable._arbitrableDisputeID
to _arbitratorDisputeID
, which is relevant to the context of dispute management and user interactions, connecting to the user-related functionalities in the main PR.Package: Backend Storage
In the realm of code, a rabbit hops,
With emails confirmed and no more flops.
Tokens dance and sessions thrive,
In the Atlas, we come alive!
New hooks and states, a joyful cheer,
For every user, we hold dear. πβ¨
Name | Link |
---|---|
Latest commit | e72bd47116842c144ee0950bcdebdc867582c423 |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-university/deploys/670ffb9c46f8b900089d1d3d |
Name | Link |
---|---|
Latest commit | e72bd47116842c144ee0950bcdebdc867582c423 |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-neo/deploys/670ffb9c2539af0008e607c2 |
Deploy Preview | https://deploy-preview-1654--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.
Name | Link |
---|---|
Latest commit | e72bd47116842c144ee0950bcdebdc867582c423 |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-testnet/deploys/670ffb9c4ebc9c00086506f2 |
Deploy Preview | https://deploy-preview-1654--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.
LGTM so far. Ping again when it is out of draft
It looks great. Let's hold on merging as it would break Neo right now, Neo needs to point to the master branch instead.
Name | Link |
---|---|
Latest commit | e72bd47116842c144ee0950bcdebdc867582c423 |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-testnet-devtools/deploys/670ffb9cc34939000862a448 |
Deploy Preview | https://deploy-preview-1654--kleros-v2-testnet-devtools.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.
Issues
8 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 e72bd471 and detected 28 issues on this pull request.
Here's the issue category breakdown:
Category | Count |
---|---|
Complexity | 3 |
Duplication | 6 |
Style | 19 |
View more on Code Climate.
Hi! ty, should i clone the comment there?
-------- Mensaje original -------- De: TurbanCoder @.> Fecha: 21/10/2024 11:34 (GMT-03:00) A: kleros/kleros-v2 @.> CC: Marcos Meneses @.>, Comment @.> Asunto: Re: [kleros/kleros-v2] Atlas integration for authentication, user settings, email confirmation, uploads (PR #1654)
@Harman-singh-waraich commented on this pull request.
In web/src/context/AtlasProvider.tsxhttps://github.com/kleros/kleros-v2/pull/1654#discussion_r1808947246:
- const intervalId = setInterval(() => {
- setIsVerified(verifySession());
- }, 5000);
- return () => {
- clearInterval(intervalId);
- };
Hello, Thanks for taking time to suggest the strategy. Much appreciated. We will be tackling this optimization in issue #1717https://github.com/kleros/kleros-v2/issues/1717 . You are welcome to review the applied strategy.
Thanks for the feedback π
β Reply to this email directly, view it on GitHubhttps://github.com/kleros/kleros-v2/pull/1654#discussion_r1808947246, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQOWOZEZPLRF3BQ53U3CQCTZ4UGF7AVCNFSM6AAAAABLCLH5PSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGOBSGMYTMNJYGE. You are receiving this because you commented.Message ID: @.***>
Hi! ty, should i clone the comment there?
Hey Marcos, yes you can comment there.
Would you be interested in addressing this issue? π
Related to https://github.com/kleros/atlas/pull/57
PR-Codex overview
This PR primarily focuses on refactoring and restructuring the authentication and user management functionalities, with significant changes to various utility functions, environment variables, and component implementations for email confirmation and user settings.
Detailed summary
addUser
,updateEmail
,confirmEmail
,fetchUser
,getNonce
,loginUser
).REACT_APP_ATLAS_URI
.sessionStorage
tolocalStorage
inuseSessionStorage
hook.EnsureAuth
component to use context for user state management.AtlasProvider
context for handling user authentication and data fetching.EmailConfirmation
component for handling email verification.FormContactDetails
to manage user settings and email verification.Summary by CodeRabbit
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Chores