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

Feat/apikey dashboard #2035

Merged
merged 41 commits into from
Nov 16, 2022
Merged

Feat/apikey dashboard #2035

merged 41 commits into from
Nov 16, 2022

Conversation

thanhdatle
Copy link
Contributor

@thanhdatle thanhdatle commented Oct 17, 2022

Problem

Implement API Dashboard for user to generate APIKey, which is used to authenticate external APIs.

Solution

A new API endpoint is introduced:

api/user/hasApiKey

which returns either:

{"message":"true"} or {"message":"false"}

to indicate if user already has an API Key

If user has not generated API Key:
image

If user has generated API Key:
image

ApiKey modal is only shown once for user to copy API Key
image

The navigation header is also updated to add Dashboard and API Integration page

image

@gitguardian

This comment was marked as outdated.

@thanhdatle thanhdatle force-pushed the feat/apikey-dashboard branch from 0589b1b to ff0e0b7 Compare November 2, 2022 06:29
@thanhdatle thanhdatle force-pushed the feat/apikey-dashboard branch from 222df8a to 0165d8e Compare November 3, 2022 07:33
@halfwhole halfwhole self-requested a review November 15, 2022 04:17
Copy link
Collaborator

@halfwhole halfwhole left a comment

Choose a reason for hiding this comment

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

LGTM! Have put down a whole bunch of comments, but they're really nits that mostly have to do with minor frontend styling - works good without them!

src/server/modules/user/UserController.ts Outdated Show resolved Hide resolved
src/server/modules/user/services/ApiKeyAuthService.ts Outdated Show resolved Hide resolved
src/client/apiintegration/index.tsx Show resolved Hide resolved
src/client/login/reducers/types.ts Outdated Show resolved Hide resolved
test/end-to-end/ApiIntegration.test.ts Show resolved Hide resolved
thanhdatle and others added 4 commits November 16, 2022 11:32
Co-authored-by: halfwhole <41856541+halfwhole@users.noreply.github.com>
Co-authored-by: halfwhole <41856541+halfwhole@users.noreply.github.com>
Co-authored-by: halfwhole <41856541+halfwhole@users.noreply.github.com>
@thanhdatle thanhdatle merged commit 8c82de1 into develop Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants