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

fix(setup-wizard): Always create a new user API token #69388

Merged
merged 3 commits into from
Apr 22, 2024

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Apr 22, 2024

In the wizard endpoint, we’d reuse existing user auth tokens of the authenticated user if:

  1. the user was part of multiple orgs (==> we can't create an org-based token)
  2. AND we found one that satisfied the necessary permissions for sourcemap upload.

With #68148 being merged, we cannot do this anymore. Plain user auth token values are only gonna be available directly after the token was created.

For the fix, this PR makes a change to the wizard endpoint to always create a new user API token. This now works just like when we create an org token for single-org users.

Closes: #69381

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 22, 2024
@HazAT HazAT enabled auto-merge (squash) April 22, 2024 10:06
@HazAT HazAT merged commit 64cd872 into master Apr 22, 2024
49 checks passed
@HazAT HazAT deleted the lms/fix-inc-727-always-create-new-usertoken branch April 22, 2024 10:14
MichaelSun48 pushed a commit that referenced this pull request Apr 25, 2024
In the wizard endpoint, we’d reuse existing user auth tokens of the
authenticated user if:
1. the user was part of multiple orgs (==> we can't create an org-based
token)
2. AND we found one that satisfied the necessary permissions for
sourcemap upload.
 
With #68148 being merged, we
cannot do this anymore. Plain user auth token values are only gonna be
available directly after the token was created.

For the fix, this PR makes a change to the wizard endpoint to always
create a new user API token. This now works just like when we create an
org token for single-org users.

Closes: #69381

---------

Co-authored-by: Daniel Griesser <daniel.griesser.86@gmail.com>
@github-actions github-actions bot locked and limited conversation to collaborators May 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants