Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

secretOrPrivateKey is not valid key material #1157

Open
tayormi opened this issue Aug 20, 2023 · 2 comments
Open

secretOrPrivateKey is not valid key material #1157

tayormi opened this issue Aug 20, 2023 · 2 comments

Comments

@tayormi
Copy link

tayormi commented Aug 20, 2023

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/jsonwebtoken@9.0.1/deno/jsonwebtoken.mjs:10:10146)
    at Re (https://esm.sh/v131/stream-chat@8.10.1/deno/stream-chat.mjs:7:17877)
    at new o (https://esm.sh/v131/stream-chat@8.10.1/deno/stream-chat.mjs:7:20595)
    at new o (https://esm.sh/v131/stream-chat@8.10.1/deno/stream-chat.mjs:8:13970)
    at Function.value (https://esm.sh/v131/stream-chat@8.10.1/deno/stream-chat.mjs:8:59543)
    at 

I have battled this for days and I am on the verge of giving up.

@rlee1990
Copy link

I got the same error not sure if its because of Deno or the package.

@tkorsback
Copy link

I have the exakt same error when using supabase edge functions.

Did you have any progress with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants