-
Notifications
You must be signed in to change notification settings - Fork 80
Add a temporary token for admin api page for testing #5484
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
base: main
Are you sure you want to change the base?
Add a temporary token for admin api page for testing #5484
Conversation
87c9c3d to
8ddf3f7
Compare
pkg/portal/graphql/token_mutation.go
Outdated
| } | ||
|
|
||
| if len(secretConfig.AdminAPISecrets) == 0 { | ||
| return nil, apierrors.NewInvalid("no admin API auth key found") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can be a internal error, because project should have at least one key.
| generateShortLivedAdminAPITokenHandle().catch(() => { | ||
| reauthentication(); | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we check the actual error thrown, and only call reauthentication if the error is related?
I think there might be other errors which we want to log an error and probably display error ui to user. e.g. Network error or server error.
8ddf3f7 to
1ac36cc
Compare
|
Updated, thank you! |
ref DEV-3252
The implementation is a bit different from the design