Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Duplicate Functionality for API Keys #3395

Merged
merged 3 commits into from
Nov 1, 2023
Merged

Conversation

mastercactapus
Copy link
Member

@mastercactapus mastercactapus commented Oct 30, 2023

Description:
This PR introduces a convenient "Duplicate" option for API keys within the GoAlert application. Users can now effortlessly create a new API key based on an existing one, streamlining key management and improving user efficiency. This feature applies to both active and expired keys, ensuring a continuous workflow. With user experience in mind, the duplication process is designed to be intuitive and seamless, mirroring the expiration characteristics of the source key relative to the current time.

Which issue(s) this PR fixes:
This is part of #3007

Out of Scope:
Visual updates for expired keys and special sorting considerations for nearly expired keys are out of scope for this PR.

Screenshots:
image

Describe any introduced user-facing changes:
Users will notice a new "Duplicate" option when managing API keys. This option allows the generation of a new key with an incremented name and an expiration period set to an equivalent duration from the current moment, just as the original key was set from its creation time.

Describe any introduced API changes:
N/A

Additional Info:
This PR also includes a fix for the previously unsorted API keys. Now, keys will be sorted by name, recognizing numeric values which will improve the findability and management of multiple keys. The "Duplicate" feature respects the expiration paradigm of the original key, maintaining consistency in key lifecycle management.

Note: This feature is behind an experimental flag, start with make start EXPERIMENTAL=gql-api-keys

Copy link
Contributor

@Forfold Forfold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I spy an AI talking 👀 Functionally works but I'm noticing the state isn't clearing on exit, so when I go to create a new key, the previous data is still in the dialog

ethan-haynes
ethan-haynes previously approved these changes Nov 1, 2023
@Forfold Forfold merged commit 8919e6c into master Nov 1, 2023
7 checks passed
@Forfold Forfold deleted the api-key-duplicate branch November 1, 2023 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants