```local claims = { email_verified: false, } + s...
# talk-kratos
c
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
    },
  },
}
For some reason this results in null https://tca0.nl/CdD
h
hey looks like we messed up and did not cherry pick your PR
sorry about that, we’ll get it sorted 🙂
c
😮 ok I spent all day debugging this hahaha
I thought I was going crazy
h
😰
i pushed the update, but it’s already midnight 😉
c
hehe, well I usually work all day round
thanks!!!
Ah you probably mean that’s it’s going to be deployed tomorrow. Well allright then 🙂 i’ll continue tomorrow
Good morning :) was this change deployed? 🙏
s
The deployment was just started, I will notify you once it is done.
c
Amazing, thank you so much
is it deployed?
s
there was some delay in deploying to staging and running tests there, which is a pre-requisite for the automation to deploy to prod
I'd estimate ~1h left, as we will face the same delay when deploying to prod 😅 sorry for the long time, we will speed up the deployment process soon
hm ok ran into some more problems....
c
how is it going ?
h
try it :)
should be good but did not have time to verify
c
Very exiciting
trying now
nope
h
i think the pr made those fields top level keys is that possible?
hm no they are under identity
c
No it should be under identity
I checked the PR 🙂
h
hm the change is live 🤔
c
What is in that commit ?
h
everything up to this commit
hmm
c
yeah then I don’t know
h
if i wasn't on my phone i could try to reproduce but unfortunately traveling…
this only works during registration though
did you sign in or sign up?
yeah timestamp is from now
c
Sign up
h
hm, unless there's someone else around we'll have to check whats going on next week. not sure if @magnificent-energy-493 or @steep-lamp-91158 are still around and free to take over
https://github.com/ory/kratos/commit/aa6eb13c1c42c11354074553fac9c90ee0a8999e This is the commit with the feature. From the tests etc it looks that the festure should just work
c
😞 I was really hoping on delivering this feature before the week was out
h
what does „ory get identity-config <project id> —format yaml“ give you? maybe its a config issue
c
this is literally the last thing
I can pm you
h
👍
i understand, trying my best to help but also limited in options 😅
c
I understand fully 🙂
s
I'll take a quick look
h
looks like the config is correct as far as i can tell
thank you patrik!
s
hm tried multiple things and it did not work
I'll investigate a bit
c
uhm…. ok
damn, so feature could be broken then?
s
I'll take a look at the PR and it's test
c
uhm I am checking the PR
Should have seen this before
but looks like the fields are not being unmarshalled ?
s
that should be fine, as the type is
json.RawMessage
it is done the same way for traits
for sanity check I also tried setting a constant value in the mapper, which also did not work
c
any errors in the logs?
s
I can't find any, let me try to replicate it locally where I can debug easier
ok weirdly enough it works locally
i.e. ory cloud local setup
I used the exact same mapper, identity schema, and even oauth2 app
which worked locally but not on production
let me try staging as well
ok staging also does not work
I am afraid that most of the team is already ooo today, so we will have to solve this monday, sorry
h
i know why, i think there was a race condition in the image builder
and it uses an old kratos image
altough, looks correct
idk we have to look into this on monday, sorry @chilly-dentist-11746 !
thank you @steep-lamp-91158
c
😞
Thanks for looking into it guys
h
No problem 🙂
Just wanted to let you know that we identified the issue. The problem is that the kratos helm chart has a bug which caused the reconciliation to fail, and basically your release is pending but not yet applied
we will fix it early next week but need to fix the stuff upstream first
the good thing is, at least you don't have to deal with this 😂
c
Uhm but it also means that we cannot deploy our stuff to production :(
h
true :/ but we'll get it all sorted very early next week!
s
Sorry that it took so long @chilly-dentist-11746, but it is now fully deployed with the right version
c
Very cool guys, will test it when I come home
@steep-lamp-91158 wasn’t able to test it today because I can’t delete my user (ory cli doesn’t work for me anymore)
m
Will have a fix for that ready in a bit!
c
You guys are amazing thanks
h
Yes fix is available and passed QA 🙂
c
and it works!
thanks guys
h
👍