[PR #4917] fix: allow signIn.social by utilizing discovery url #13903

Open
opened 2026-04-13 09:12:12 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4917
Author: @dvanmali
Created: 9/25/2025
Status: 🔄 Open

Base: mainHead: genericOAuth


📝 Commits (3)

  • b48babc fix: allow signIn.social by utilizing discovery url
  • 831efac fix: shrink by using default provider
  • 1ba326f fix: properly delegates additional params to createAuthorizationUrl function

📊 Changes

2 files changed (+33 additions, -14 deletions)

View changed files

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

📄 Description

Fixes issue of authorization url not being discovered by social provider.

This addition also enables signIn.social beyond just signIn.oauth2.

Closes: #3278


Summary by cubic

Use OIDC discovery to resolve the authorization URL in generic OAuth, fixing social login flows. Enables signIn.social for providers configured with discoveryUrl.

  • Bug Fixes
    • Fetch authorization_endpoint from discoveryUrl when provided.
    • Apply authorizationUrlParams to the discovered authorization URL.
    • Add test covering signIn.social with a discovered auth URL and correct redirect.

🔄 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/4917 **Author:** [@dvanmali](https://github.com/dvanmali) **Created:** 9/25/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `genericOAuth` --- ### 📝 Commits (3) - [`b48babc`](https://github.com/better-auth/better-auth/commit/b48babce9954b09aaba5b9a5de16e95f812bdfc4) fix: allow signIn.social by utilizing discovery url - [`831efac`](https://github.com/better-auth/better-auth/commit/831efac7ce9f8538bec1a41285af9264e14bf88c) fix: shrink by using default provider - [`1ba326f`](https://github.com/better-auth/better-auth/commit/1ba326f654dbe4fd6a43431de1e3000127766587) fix: properly delegates additional params to createAuthorizationUrl function ### 📊 Changes **2 files changed** (+33 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/generic-oauth/generic-oauth.test.ts` (+14 -0) 📝 `packages/better-auth/src/plugins/generic-oauth/index.ts` (+19 -14) </details> ### 📄 Description Fixes issue of authorization url not being discovered by social provider. This addition also enables `signIn.social` beyond just `signIn.oauth2`. Closes: #3278 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Use OIDC discovery to resolve the authorization URL in generic OAuth, fixing social login flows. Enables signIn.social for providers configured with discoveryUrl. - **Bug Fixes** - Fetch authorization_endpoint from discoveryUrl when provided. - Apply authorizationUrlParams to the discovered authorization URL. - Add test covering signIn.social with a discovered auth URL and correct redirect. <!-- End of auto-generated description by cubic. --> --- <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 09:12:12 -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#13903