OIDC example from https://openidconnect.net/ doesn't work with better-auth #746

Closed
opened 2026-03-13 08:02:41 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @kirill-dev-pro on GitHub (Feb 26, 2025).

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

  1. Create new app with oidcProvider
  2. Create new oauth app
  3. use app credentials to check how oidc example work on https://openidconnect.net/
  4. First step of the process makes api call to /api/auth/oauth2/authorize?error=invalid_request&error_description=invalid%20code_challenge%20method
  5. this redirects browser to /api/auth/error?error=invalid_client

Current vs. Expected behavior

Current behavior: it shows an error

Image

expected behavior: it completes example on https://openidconnect.net/

What version of Better Auth are you using?

1.1.22-beta.2

Provide environment information

macOS, node 23

Which area(s) are affected? (Select all that apply)

Backend

Auth config (if applicable)

import { betterAuth } from "better-auth"
export const auth = betterAuth({
  plugins: [
    oidcProvider({
      loginPage: '/login',
      allowDynamicClientRegistration: true,
      allowPlainCodeChallengeMethod: true,
    }),
  ]
});

Additional context

No response

Originally created by @kirill-dev-pro on GitHub (Feb 26, 2025). ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce 1. Create new app with oidcProvider 2. Create new oauth app 3. use app credentials to check how oidc example work on https://openidconnect.net/ 4. First step of the process makes api call to `/api/auth/oauth2/authorize?error=invalid_request&error_description=invalid%20code_challenge%20method` 5. this redirects browser to /api/auth/error?error=invalid_client ### Current vs. Expected behavior Current behavior: it shows an error <img width="587" alt="Image" src="https://github.com/user-attachments/assets/3aa75b66-d686-4fe0-a108-26c43b0be052" /> expected behavior: it completes example on https://openidconnect.net/ ### What version of Better Auth are you using? 1.1.22-beta.2 ### Provide environment information ```bash macOS, node 23 ``` ### Which area(s) are affected? (Select all that apply) Backend ### Auth config (if applicable) ```typescript import { betterAuth } from "better-auth" export const auth = betterAuth({ plugins: [ oidcProvider({ loginPage: '/login', allowDynamicClientRegistration: true, allowPlainCodeChallengeMethod: true, }), ] }); ``` ### Additional context _No response_
GiteaMirror added the bug label 2026-03-13 08:02:41 -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#746