-
-
Notifications
You must be signed in to change notification settings - Fork 656
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: Add init api tokens option #1181
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/unleash-team/unleash-docs/DBwWdCsapVsCZzNxudTkbgaMMyTT |
project: tokenParts[0], | ||
environment: tokenParts[1], | ||
secret: `${tokenParts[0]}:${tokenParts[1]}.${tokenParts[2]}`, | ||
type: ApiTokenType.ADMIN, |
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.
Are we sure it only makes sense to only support Admin tokens as part of init? I am leaning towards yes, because you can use these to create client SDK tokens with the Admin API token.
What do you think @chriswk?
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.
It seems reasonable, as you say, that will allow you to use the created admin token to create necessary client tokens.
I will try to create an automated test for this before it is merged. |
I have refactored the code a bit:
In addition I have added tests 🚀 |
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.
Looks great! Some very small, very optional language things in the docs section at the end
Co-authored-by: sighphyre <liquidwicked64@gmail.com>
Co-authored-by: sighphyre <liquidwicked64@gmail.com>
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.
Nice! I have a couple minor change suggestions. I also have a few questions that I would love to have clarified if you've got the time - they're inline in that case 😇
* refactor: validate strategy name on blur * refactor: remove strategy parameter type text in favor of docs * refactor: improve pie chart rendering * refactor: show icons for all feature strategies * refactor: fix list parameter add button style
Issue: #1153
server-dev
INIT_ADMIN_API_TOKENS
env variablefixes #1153