File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,6 @@ import postgres from 'postgres'
3838import { v4 as uuidv4 } from 'uuid'
3939import { ssoProvider , user } from '../schema'
4040
41- // Self-contained SSO types (matching Better Auth's structure)
4241interface 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
You can’t perform that action at this time.
0 commit comments