We have this mapper for OIDC logins: ```local cla...
# talk-kratos
a
We have this mapper for OIDC logins:
Copy code
local 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 later
l
just want to say I appreciate you sharing this because it solves a problem I was curious about! we also are using discord, but I don't have some of the extra data mapped.
@alert-painter-66256 did you also need to update your identity schema to accommodate this? if so, would you mind sharing?
I think I got it.