I’m using FaunaDB in a study project and when I connected it to my code, it doesn’t authenticate, I have a secret key with administrator permission and it doesn’t authenticate, it keeps giving unauthorized.
#fauna.ts
import { Client } from "faunadb";
export const fauna = new Client({
secret: process.env.DB_KEY,
keepAlive: false,
});
test.ts
await fauna.query(Create(Collection("users"), { data: email }));
Hi @lucasantonio Welcome!
You get unauthorized errors when you connect to the wrong Region Group. This may be a duplicate of this other topic. Does it look like this is your issue?
https://forums.fauna.com/t/unauthorized-when-using-valid-secret-key/2306/2?u=ptpaterson
Hi @lucasantonio. Were you able to get connected to Fauna through the driver?
Please let us know if this topic can be marked as solved or if there is something else going on.
Thanks!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.