Closed HazemKhaled closed 1 year ago
I'm struggling with Upstash recently, but I found the current approach is not working properly
the current command ["SET", "${authData.saleorApiUrl}", "${data}"]
["SET", "${authData.saleorApiUrl}", "${data}"]
sent as
["SET", "https://hazem.eu.saleor.cloud/graphql/", "{"domain":"hazem.eu.saleor.cloud","token":"Ur74MzII5S8tJJ7FEAvSU9d0VLq5Sq","saleorApiUrl":"https://hazem.eu.saleor.cloud/graphql/","appId":"QXBwOjEwNQ==","jwks":" ..... "]
Which needed to escape double quotes, especially in jwks
jwks
Solution: Use RedisJSON, which is supported recently by Upstash
check this: https://docs.upstash.com/redis/sdks/javascriptsdk/modules/json#set
@krzysztofwolski can you look into that?
We can check RedisJSON or just escape JWKS (or encode)
@HazemKhaled Issue has been fixed in the latest release of the App SDK. Thank you for reporting!
I'm struggling with Upstash recently, but I found the current approach is not working properly
the current command
["SET", "${authData.saleorApiUrl}", "${data}"]
sent as
["SET", "https://hazem.eu.saleor.cloud/graphql/", "{"domain":"hazem.eu.saleor.cloud","token":"Ur74MzII5S8tJJ7FEAvSU9d0VLq5Sq","saleorApiUrl":"https://hazem.eu.saleor.cloud/graphql/","appId":"QXBwOjEwNQ==","jwks":" ..... "]
Which needed to escape double quotes, especially in
jwks
Solution: Use RedisJSON, which is supported recently by Upstash
check this: https://docs.upstash.com/redis/sdks/javascriptsdk/modules/json#set