/** *
( options: OAuthUserConfig
): OAuthConfig
{ return { id: "trakt", name: "Trakt", type: "oauth", authorization: "https://trakt.tv/oauth/authorize?scope=", token: "https://api.trakt.tv/oauth/token", userinfo: { url: "https://api.trakt.tv/users/me?extended=full", async request({ tokens, provider }) { return await fetch(provider.userinfo?.url as URL, { headers: { Authorization: `Bearer ${tokens.access_token}`, "trakt-api-version": "2", "trakt-api-key": provider.clientId, }, }).then(async (res) => await res.json()) }, }, profile(profile) { return { id: profile.ids.slug, name: profile.name, email: null, // trakt does not provide user emails image: profile.images.avatar.full, // trakt does not allow hotlinking } }, style: { bg: "#ED2224", text: "#fff" }, options, } }