[PR #2607] [MERGED] fix: remove userInfoUrl check to allow using custom function without url #12643

Closed
opened 2026-04-13 08:30:47 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/2607
Author: @BlankParticle
Created: 5/10/2025
Status: Merged
Merged: 5/10/2025
Merged by: @Bekacru

Base: mainHead: fix/allow-getuserinfo-without-url


📝 Commits (1)

  • 278765e fix: remove userInfoUrl check to allow using custom function without url

📊 Changes

1 file changed (+0 additions, -3 deletions)

View changed files

📝 packages/better-auth/src/plugins/generic-oauth/index.ts (+0 -3)

📄 Description

As of now if I try to create a generic oauth provider by providing a custom getUserInfo function, it fails if I also dont provide a url for userInfoUrl.

This should not be the case, if the getUserInfo is provided it should be called regardless of the url which is unused either way, so It removes the check for the URL and calls the function if available rightaway


🔄 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/2607 **Author:** [@BlankParticle](https://github.com/BlankParticle) **Created:** 5/10/2025 **Status:** ✅ Merged **Merged:** 5/10/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `fix/allow-getuserinfo-without-url` --- ### 📝 Commits (1) - [`278765e`](https://github.com/better-auth/better-auth/commit/278765e5a37ca9febe70e1c36ec8ef4512411432) fix: remove userInfoUrl check to allow using custom function without url ### 📊 Changes **1 file changed** (+0 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/generic-oauth/index.ts` (+0 -3) </details> ### 📄 Description As of now if I try to create a generic oauth provider by providing a custom `getUserInfo` function, it fails if I also dont provide a url for `userInfoUrl`. This should not be the case, if the `getUserInfo` is provided it should be called regardless of the url which is unused either way, so It removes the check for the URL and calls the function if available rightaway --- <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-04-13 08:30:47 -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#12643