cube-js/cube

Security Context does not convert text value to JSON

Aberta

#4.811 aberto em 27 de jun. de 2022

 (8 comentários) (0 reação) (0 responsável)Rust (1.965 forks)batch import
docshelp wanted

Métricas do repositório

Stars
 (19.563 estrelas)
Métricas de merge de PR
 (Mesclagem média 5d 16h) (138 fundiu PRs em 30d)

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]

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

Guia do colaborador