[PR #2756] [CLOSED] fix(oidc): await for getAdditionalUserInfoClaim #4470

Closed
opened 2026-03-13 11:48:17 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/2756
Author: @NefixEstrada
Created: 5/23/2025
Status: Closed

Base: mainHead: fix-oidc-additional-claims


📝 Commits (1)

  • 55d10a0 fix(oidc): await for getAdditionalUserInfoClaim

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 packages/better-auth/src/plugins/oidc-provider/index.ts (+2 -2)

📄 Description

The signature of the function is either a sync function or an async function. Without this change, if you use an async function (that in theory should be correct), the response gets returned without the promise being finished.

With this change, if:

  • is an async function, will wait for the promise to finish before returning
  • is a sync function, will create a promise, run the function, and wait for the promise to finish

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/2756 **Author:** [@NefixEstrada](https://github.com/NefixEstrada) **Created:** 5/23/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix-oidc-additional-claims` --- ### 📝 Commits (1) - [`55d10a0`](https://github.com/better-auth/better-auth/commit/55d10a0e17f4ad7b22b79c3b068da28bb362bef7) fix(oidc): await for getAdditionalUserInfoClaim ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/oidc-provider/index.ts` (+2 -2) </details> ### 📄 Description The signature of the function is either a sync function or an async function. Without this change, if you use an async function (that in theory should be correct), the response gets returned without the promise being finished. With this change, if: - is an async function, will wait for the promise to finish before returning - is a sync function, will create a promise, run the function, and wait for the promise to finish --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 11:48:17 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#4470