Skip to content

Commit

Permalink
chore: dont use credentials class in example
Browse files Browse the repository at this point in the history
  • Loading branch information
ewanharris committed Feb 13, 2024
1 parent e299e5e commit 0ed36b2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions example/example1/example1.mjs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { Credentials, CredentialsMethod, FgaApiValidationError, OpenFgaClient, TypeName } from "@openfga/sdk";
import { CredentialsMethod, FgaApiValidationError, OpenFgaClient, TypeName } from "@openfga/sdk";

async function main () {
let credentials;
if (process.env.FGA_CLIENT_ID) {
credentials = new Credentials({
credentials = {
method: CredentialsMethod.ClientCredentials,
config: {
clientId: process.env.FGA_CLIENT_ID,
clientSecret: process.env.FGA_CLIENT_SECRET,
apiAudience: process.env.FGA_API_AUDIENCE,
apiTokenIssuer: process.env.FGA_API_TOKEN_ISSUER
}
});
};
}

const fgaClient = new OpenFgaClient({
Expand Down

0 comments on commit 0ed36b2

Please sign in to comment.