stream-chat-js
stream-chat-js copied to clipboard
secretOrPrivateKey is not valid key material
I am using a Supabase edge function to create tokens. When I call
const client = StreamChat.getInstance<StreamType>(
Deno.env.get("GETSTREAM_API_KEY") as string,
Deno.env.get("GETSTREAM_API_KEY_SECRET") as string,
);
I get the error below.
Error: secretOrPrivateKey is not valid key material
at Object.de.exports [as sign] (https://esm.sh/v131/[email protected]/deno/jsonwebtoken.mjs:10:10146)
at Re (https://esm.sh/v131/[email protected]/deno/stream-chat.mjs:7:17877)
at new o (https://esm.sh/v131/[email protected]/deno/stream-chat.mjs:7:20595)
at new o (https://esm.sh/v131/[email protected]/deno/stream-chat.mjs:8:13970)
at Function.value (https://esm.sh/v131/[email protected]/deno/stream-chat.mjs:8:59543)
at
I have battled this for days and I am on the verge of giving up.
I got the same error not sure if its because of Deno or the package.
I have the exakt same error when using supabase edge functions.
Did you have any progress with this?