# Cognito and Non Nested Claims

**URL:** <https://discuss.dgraph.io/t/cognito-and-non-nested-claims/10328>\
**Category:** Dgraph Cloud\
**Tags:** kind:feature\
**Created:** [September 13, 2020, 8:58pm UTC](https://discuss.dgraph.io/t/cognito-and-non-nested-claims/10328 "2020-09-13T20:58:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrHephaestus](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@MrHephaestus](https://discuss.dgraph.io/u/MrHephaestus)\
**Post date:** [September 13, 2020, 8:58pm UTC](https://discuss.dgraph.io/t/cognito-and-non-nested-claims/10328/1 "2020-09-13T20:58:09Z")

</div>

As it currently stands AWS Cognito doesn’t support nested claims in JWTs. The ability to refer to non nested values for authorization would be helpful. My apologies if this is already available and I have just overlooked it.

Edit: Alternatively if values could be parsed from a stringified map that would work.

---

<div class="post-metadata">

**Author:** ![arijit](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/arijit/32/2116_2.png) [@arijit](https://discuss.dgraph.io/u/arijit)\
**Post date:** [September 14, 2020, 11:40am UTC](https://discuss.dgraph.io/t/cognito-and-non-nested-claims/10328/3 "2020-09-14T11:40:20Z")

</div>

We do support parsing custom claims as a string.  
Issue: [If JWT custom claim field is string, parse as JSON by dpeek · Pull Request #5513 · dgraph-io/dgraph · GitHub](https://github.com/dgraph-io/dgraph/pull/5513)  
Fix: [fix(GraphQL): Custom Claim will be parsed as JSON if it is encoded as a string by arijitAD · Pull Request #5668 · dgraph-io/dgraph · GitHub](https://github.com/dgraph-io/dgraph/pull/5668)  
Let me know if this works for you.

---

<div class="post-metadata">

**Author:** ![pawan](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/pawan/32/1946_2.png) [@pawan](https://discuss.dgraph.io/u/pawan)\
**Post date:** [October 9, 2020, 8:19am UTC](https://discuss.dgraph.io/t/cognito-and-non-nested-claims/10328/5 "2020-10-09T08:19:15Z")

</div>


