remove unecessary fields in auth provider

This commit is contained in:
leander committed 2025-02-19 22:04:18 +01:00
1 parent 131d86380e
commit 7f618a5ad2
1 file changed
-6
-6
View File
@@ -7,8 +7,6 @@ export const authOptions = {
name: "Galtinn", name: "Galtinn",
type: "oauth", type: "oauth",
wellKnown: `${process.env.GALTINN_API_URL}/oauth/.well-known/openid-configuration/`, wellKnown: `${process.env.GALTINN_API_URL}/oauth/.well-known/openid-configuration/`,
//auth: `${process.env.GALTINN_API_URL}/oauth/authorize`,
//token: `${process.env.GALTINN_API_URL}/oauth/token`,
userinfo: `${process.env.GALTINN_API_URL}/me/oauth`, userinfo: `${process.env.GALTINN_API_URL}/me/oauth`,
checks: ["pkce", "state"], checks: ["pkce", "state"],
clientId: process.env.GALTINN_ID, clientId: process.env.GALTINN_ID,
@@ -17,16 +15,12 @@ export const authOptions = {
profile(profile) { profile(profile) {
return { return {
id: profile.sub, id: profile.sub,
name: profile.name, // It's dumb to assume names are formatted this way but oh well
email: profile.email, email: profile.email,
username: profile.preferred_username, username: profile.preferred_username,
date_of_birth: profile.date_of_birth,
place_of_study: profile.place_of_study,
is_volunteer: profile.is_volunteer, is_volunteer: profile.is_volunteer,
is_member: profile.is_member, is_member: profile.is_member,
last_membership: profile.last_membership, last_membership: profile.last_membership,
groups: profile.groups, groups: profile.groups,
discord_profile: profile.discord_profile,
}; };
}, },
}, },