import type { OAuthConfig, OAuthUserConfig } from "." export interface UnitedEffectsProfile extends Record { sub: string email: string } export default function UnitedEffects

( options: OAuthUserConfig

& { issuer: string } ): OAuthConfig

{ return { id: "united-effects", name: "United Effects", wellKnown: `${options.issuer}/.well-known/openid-configuration`, type: "oauth", authorization: { params: { scope: "openid email profile", resource: options.issuer }, }, checks: ["pkce", "state"], idToken: true, profile(profile) { return { id: profile.sub, name: null, email: profile.email, image: null, } }, options, } }