alert-painter-66256
05/18/2023, 9:34 PMlocal claims = {
email_verified: false,
} + std.extVar('claims');
{
identity: {
traits: {
// Allowing unverified email addresses enables account
// enumeration attacks, if the value is used for
// verification or as a password login identifier.
//
// Therefore we only return the email if it (a) exists and (b) is marked verified
// by Discord.
[if 'email' in claims && claims.email_verified then 'email' else null]: claims.email,
username: claims.nickname,
},
metadata_public: {
discord_id: claims.sub
},
},
}
this doesn’t work for linking an OIDC laterloud-engineer-1276
05/19/2023, 8:38 PMloud-engineer-1276
06/13/2023, 4:58 PMloud-engineer-1276
06/14/2023, 2:07 AM