twentyhq / twenty

Building a modern alternative to Salesforce, powered by the community.
https://twenty.com
GNU Affero General Public License v3.0
15.8k stars 1.73k forks source link

Verification popup can be activated multiple times #6912

Open BOHEUS opened 1 week ago

BOHEUS commented 1 week ago

Scenario:

  1. Log in
  2. Go to Settings > Developers
  3. Generate new API key
  4. Go back to Developers and check details of newly created key
  5. Regenerate that key, write yes in popup and click Enter several times
  6. Close popup by clicking 'Cancel' button, click 'Delete' button, type 'yes' and click Enter several times

Actual: By clicking Enter key over and over, user can repeat action (look how page refreshes and how UUID in URL changes) Expected: When 'yes' is typed in popup and user clicks Enter key once, popup should disappear and correlated action should be performed only once

ffshreyansh commented 1 week ago

@BOHEUS I tried following your mentioned steps when logged in with the test credentials but when i am trying to save the New API key form this error is thrown : Error: ApolloError: Variable "$input" got invalid value { id: "42bcac73-3a07-4a01-8d7a-4320c940aacf" }; Field "expiresAt" of required type "DateTime!" was not provided.. I tried changing the input of the expiration date, but still same error.

Please let me know if it's and issue to be noted or am I doing something wrong!

Screenshot 2024-09-08 at 4 07 30 AM
ffshreyansh commented 1 week ago

@Bonapara @BOHEUS I just started the project in my local, but the above error i mentioned doesn't appear there. If all good can you please assign this issue to me... I am already working on it... Thanks

BOHEUS commented 1 week ago

@ffshreyansh could you try repeating this on demo? I could reproduce it on both demo and locally. About the issue with expiration date, maybe it's a new bug, I'll confirm it whether I'm able to reproduce it and report it back, for now, use Never in expiration date if that works

BOHEUS commented 1 week ago

I created API keys with different expiration dates without any problems, I have no idea how can I help you with your problem, does any error (other than ApolloError) in devtools or in terminal appear when creating API key?

ffshreyansh commented 1 week ago

@BOHEUS only the demo is having this issue otherwise my locally it's all fine with different expiration dates. For now I will move ahead with this Issue's PR, i don't think it will affect it.

BOHEUS commented 1 week ago

@ffshreyansh now I see what you meant by this error, someone literally broke the whole app

@Bonapara @charlesBochet please take a closer look at noah@demo.dev account in dev, this account is unusable, object's records aren't loading, webhook/API key details aren't loading either, activating disabled objects doesn't work, maybe creating a database dump and trying to reverse it locally will help find out what happened and fix those bugs?

ffshreyansh commented 1 week ago

@BOHEUS I have created the PR for this issue #6938 , please let me know what is the next step for the review.

BOHEUS commented 1 week ago

Wait till someone from core team will review it and either give feedback what needs further fixing or merge it