[PR #6021] docs: update generic oauth plugin documentation to clarify that the redirectURI must include providerId parameter for proper routing #6389

Open
opened 2026-03-13 12:57:10 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6021
Author: @IdrisGit
Created: 11/16/2025
Status: 🔄 Open

Base: canaryHead: docs/generic-oauth-providerId-shoud-match-in-redirectURI


📝 Commits (2)

  • 394ec97 docs(generic-oauth): update docs to clarify that in generic oauth the redirect-uri must have providerId as the last param
  • 98764d1 docs(generic-oauth): make clarification more concise

📊 Changes

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

View changed files

📝 docs/content/docs/plugins/generic-oauth.mdx (+3 -3)

📄 Description

We encountered this issue when someone in the team changed the redirect URI for a Generic OAuth provider to /api/auth/callback/microsoft. Even though the client was sending the correct providerId, the plugin was looking for a provider named "microsoft" in the Generic OAuth config and throwing "No config found for provider microsoft".

It took me 4 hours to figure this out after digging into the source code, since this requirement wasn't clear from the existing documentation. The problem was that Generic OAuth needs the :providerId parameter in the redirect URL path to route to the right provider configuration, unlike built-in social providers that have predefined URLs.

This should help prevent similar configuration headaches when setting up custom OAuth providers.

Open to any suggestions on improving the language or clarity!


Summary by cubic

Clarified Generic OAuth docs: the redirect URI must include :providerId (e.g., /api/auth/oauth2/callback/my-provider) so the plugin routes to the correct provider config, unlike built-in providers with fixed URLs. This helps avoid "No config found for provider …" errors from misconfigured callbacks.

Written for commit 98764d1839d08ff9b9f40b9c5e3e859058ddb925. Summary will update on new commits.


🔄 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/6021 **Author:** [@IdrisGit](https://github.com/IdrisGit) **Created:** 11/16/2025 **Status:** 🔄 Open **Base:** `canary` ← **Head:** `docs/generic-oauth-providerId-shoud-match-in-redirectURI` --- ### 📝 Commits (2) - [`394ec97`](https://github.com/better-auth/better-auth/commit/394ec977c2a71d7cd69bafdc2411daf3a8fd9b78) docs(generic-oauth): update docs to clarify that in generic oauth the redirect-uri must have providerId as the last param - [`98764d1`](https://github.com/better-auth/better-auth/commit/98764d1839d08ff9b9f40b9c5e3e859058ddb925) docs(generic-oauth): make clarification more concise ### 📊 Changes **1 file changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/generic-oauth.mdx` (+3 -3) </details> ### 📄 Description We encountered this issue when someone in the team changed the redirect URI for a Generic OAuth provider to `/api/auth/callback/microsoft`. Even though the client was sending the correct `providerId`, the plugin was looking for a provider named "microsoft" in the Generic OAuth config and throwing "No config found for provider microsoft". It took me 4 hours to figure this out after digging into the source code, since this requirement wasn't clear from the existing documentation. The problem was that Generic OAuth needs the `:providerId` parameter in the redirect URL path to route to the right provider configuration, unlike built-in social providers that have predefined URLs. This should help prevent similar configuration headaches when setting up custom OAuth providers. Open to any suggestions on improving the language or clarity! <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Clarified Generic OAuth docs: the redirect URI must include :providerId (e.g., /api/auth/oauth2/callback/my-provider) so the plugin routes to the correct provider config, unlike built-in providers with fixed URLs. This helps avoid "No config found for provider …" errors from misconfigured callbacks. <sup>Written for commit 98764d1839d08ff9b9f40b9c5e3e859058ddb925. Summary will update on new commits.</sup> <!-- 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-03-13 12:57:10 -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#6389