Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
tafaust authored Nov 10, 2024
2 parents d1bfd23 + be05291 commit 73cc72b
Show file tree
Hide file tree
Showing 6 changed files with 296 additions and 1,262 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ If you want to use `passport js` and OAuth 2.0 introspection, head over to

## Goals

This is the "client library" for the ZITADEL API. It contains the compiled
This is meant to be a Node.js SDK for the ZITADEL API. It contains the compiled
proto files from the original ZITADEL repository and therefore helps to
access the API and manage ressources. Also, it contains helpers to
access the API and manage resources. Moreover, it contains helpers to
authenticate a given service account against ZITADEL.

To summarize:
Expand Down
4 changes: 2 additions & 2 deletions examples/access-api-with-pat.commonjs.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const { createAccessTokenInterceptor, createAuthClient } = require('@zitadel/node/api');

const apiEndpoint = 'https://zitadel-libraries-l8boqa.zitadel.cloud';
const personalAccessToken = 'Dp6uT84aVTqYLSMpk-H1-B3SPuqFms-Tz77cgWKlyrY3JxsZcDmb7kZoRK2ixaVNfuqmXfE';

async function main() {
const { createAccessTokenInterceptor, createAuthClient } = await import('@zitadel/node/dist/api/index.js');

const client = createAuthClient(apiEndpoint, createAccessTokenInterceptor(personalAccessToken));
const response = await client.getMyUser({});

Expand Down
2 changes: 1 addition & 1 deletion examples/access-api-with-pat.esm.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createAccessTokenInterceptor, createAuthClient } from '@zitadel/node/api';
import { createAccessTokenInterceptor, createAuthClient } from '@zitadel/node/dist/api/index.js';

const apiEndpoint = 'https://zitadel-libraries-l8boqa.zitadel.cloud';
const personalAccessToken = 'Dp6uT84aVTqYLSMpk-H1-B3SPuqFms-Tz77cgWKlyrY3JxsZcDmb7kZoRK2ixaVNfuqmXfE';
Expand Down
50 changes: 24 additions & 26 deletions examples/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 73cc72b

Please sign in to comment.