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

Optimize TokenResponse #6882

Closed
3 tasks done
Tracked by #6808
muhlemmer opened this issue Nov 7, 2023 · 0 comments · Fixed by #7822
Closed
3 tasks done
Tracked by #6808

Optimize TokenResponse #6882

muhlemmer opened this issue Nov 7, 2023 · 0 comments · Fixed by #7822
Assignees
Labels
backend performance This are issues that are about improving the performance

Comments

@muhlemmer
Copy link
Contributor

muhlemmer commented Nov 7, 2023

Currently there are 3 codepaths in CreateTokenResponse:

  1. CreateAccessToken
  2. CreateIDToken
  3. CreateRefreshToken

Between them there are a number of queries that get re-executed, such as GetUserByID, project and scope related searches. This can be optimized in a way that it benefits all token grant types.

Acceptance criteria

  • Reuse the project as provided by Optimize OIDC VerifyClient method #6881
  • Query for all state once and then create the different token types
  • Try to minimalise the the amount of queries required by using JOINs
@muhlemmer muhlemmer added backend performance This are issues that are about improving the performance labels Nov 13, 2023
@muhlemmer muhlemmer self-assigned this Apr 11, 2024
muhlemmer added a commit to zitadel/oidc that referenced this issue Apr 30, 2024
…istration

This change requires an additional argument to the op.RegisterLegacyServer constructor which passes the Authorize Callback Handler.
This allows implementations to use their own handler instead of the one provided by the package.
The current handler is exported for legacy behavior.

This change is not considered breaking, as RegisterLegacyServer is flagged experimental.

Related to zitadel/zitadel#6882
muhlemmer added a commit to zitadel/oidc that referenced this issue Apr 30, 2024
…istration (#598)

This change requires an additional argument to the op.RegisterLegacyServer constructor which passes the Authorize Callback Handler.
This allows implementations to use their own handler instead of the one provided by the package.
The current handler is exported for legacy behavior.

This change is not considered breaking, as RegisterLegacyServer is flagged experimental.

Related to zitadel/zitadel#6882
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend performance This are issues that are about improving the performance
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant