Hi, I'm having an issue with a custom field which ...
# ask-a-descoper
u
Hi, I'm having an issue with a custom field which I'm pretty sure used to work. We have an admitted flag that's a custom claim (admitted off waitlist). I've checked that it's checked (I believe check present means true) in the descope user table. I've checked the JWT Template and the custom field is present (as a dynamic value). But per jwt.io the DS cookie I'm receiving on the frontend has an admitted value of null. How do I debug this further?
a
let me check this
u
Thanks @Atharva Joshi. We did just update: - "@descope/nextjs-sdk": "0.14.38", + "@descope/nextjs-sdk": "0.14.44", But that could be related or not.
a
can you confirm that the dynamic value is actually populated and also check your empty claims policy - whether its "set to null" - in your JWT template settings.
u
I think I'm not following on both counts. Can you kindly clarify?
Empty claims policy: Leave empty (default)
👍 1
And by actually populated do you mean in the jwt template or the user table? I see the entry in both, but maybe there's a third place?
I am a bit surprised to be seeing "null" for a Boolean, but several of the Booleans appear to be reporting "null"
a
And by actually populated do you mean in the jwt template or the user table? I see the entry in both, but maybe there's a third place?
i mean to say you can check by running the flow if the flag is actually set to a value by using a scriptlet to console log it?
u
I am setting that flag manually in the user's table.. but going in, edit user.. and checking the checkbox associated with admitted. So I don't think there's a flow to debug.
a
ohh i see can you send a SS of the flag in users table?
u
This or the custom attribute definition?
Here's the definition
Is it safe to paste a parsed jwt here? Happy to share.. here's the first few lines:
Copy code
{
  "admitted": null,
  
: [
    "email"
  ],
Copy code
{
  "admitted": null,
  "amr": [
    "email"
  ],
👍 1
First one -- copy paste failed me so I tried again but ran out of edit time
We're approaching the 2 hour mark. I think I've got to rollback the version. Especially since, looking deeper, ALL my booleans are being reported as null in the jwt EXCEPT for the one I set in the flow. That seems like a rather major blocker to me.
What's weird is that they're null regardless of whether their value should be true or false.
a
@Uri Braun im trying to reproduce your error on my side Ill get back to you ASAP
@Uri Braun i am able to reproduce your condition the attributes that you set in the Custom template have to be set to a value in the flow and checking them in the users table does not set them to true automatically Please use a "Update User / Properties" action to set a value for the attributes.
u
We're trying to set users to either admitted or not from the waitlist. That's a manual operation. How are we suggested to do this administratively?
a
oh i see let me check for a viable solution for this usecase
u
Can we schedule a huddle to discuss this? I think this is a recent failure in the newer code and we should figure out how to work around this issue and schedule a time to try a fix.
a
sure ill send a zoom invite
👍 1
u
Thank you @Atharva Joshi
🙏 1