cube-js / cube-js/cube

Security Context does not convert text value to JSON

Open
#4,811 8 comments 0 reactions 0 assignees View on GitHub
docs help wanted
Dominant language
Rust
Stars
20.8k
Forks
2.1k
Avg merge
1d 2h
Merged PRs (30d)
181

Description

**Describe the bug**
I am trying to use security context with Cognito and JWT. As per your documentation we generate JWT. The response is like:

` "user": "{\"company_id\":\"moleculedata\",\"user_id\":\"5badab3e-1e5d-4414-8a80-269fdaf2ff8e\",\"roles\":[\"user\"]}"`

similar to example in the documentation [https://cube.dev/docs/security/jwt/aws-cognito]

Screenshot 2022-06-27 at 13 02 11

when I try to use it with CUBEJS_JWT_CLAIMS_NAMESPACE=user, I get an error in the playground:

`TypeCannot create proxy with a non-object as target or handler`

I hope to use the values inside user key form JWT.

If any questions, please let me know.

Kind regards,
Rytis

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.