Skip to content

Commit eb33508

Browse files
committed
remove trailing slash
1 parent 2c8c116 commit eb33508

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/db/scripts/register-sso-provider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ import postgres from 'postgres'
3838
import { v4 as uuidv4 } from 'uuid'
3939
import { ssoProvider, user } from '../schema'
4040

41-
// Self-contained SSO types (matching Better Auth's structure)
4241
interface SSOMapping {
4342
id: string
4443
email: string
@@ -219,7 +218,8 @@ function buildSSOConfigFromEnv(): SSOProviderConfig | null {
219218
userInfoEndpoint: process.env.SSO_OIDC_USERINFO_ENDPOINT,
220219
jwksEndpoint: process.env.SSO_OIDC_JWKS_ENDPOINT,
221220
discoveryEndpoint:
222-
process.env.SSO_OIDC_DISCOVERY_ENDPOINT || `${issuer}/.well-known/openid-configuration`,
221+
process.env.SSO_OIDC_DISCOVERY_ENDPOINT ||
222+
`${issuer.replace(/\/$/, '')}/.well-known/openid-configuration`,
223223
}
224224
} else if (providerType === 'saml') {
225225
const entryPoint = process.env.SSO_SAML_ENTRY_POINT

0 commit comments

Comments
 (0)