Skip to content

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

Merged
HazAT merged 3 commits intomasterfrom
lms/fix-inc-727-always-create-new-usertoken
Apr 22, 2024
Merged

fix(setup-wizard): Always create a new user API token#69388
HazAT merged 3 commits intomasterfrom
lms/fix-inc-727-always-create-new-usertoken

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
@Lms24 Lms24 marked this pull request as ready for review April 22, 2024 09:47
@HazAT HazAT enabled auto-merge (squash) April 22, 2024 10:06
@HazAT HazAT merged commit 64cd872 into master Apr 22, 2024
@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