Skip to content

Commit

Permalink
adds environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Dopeamin committed Sep 13, 2024
1 parent 4bd1f7e commit 5e6e0fc
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const apiSecret = process.env.CORBADO_API_SECRET;
const frontendAPI = process.env.CORBADO_FRONTEND_API;
const backendAPI = process.env.CORBADO_BACKEND_API;

const config = new Config(projectID, apiSecret, frontendAPI, backendAPI);
const config = new Corbado.Config(projectID, apiSecret, frontendAPI, backendAPI);
const sdk = new Corbado.SDK(config);
```

Expand Down
4 changes: 4 additions & 0 deletions examples/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CORBADO_PROJECT_ID=pro-xxxxxxxxxxxxxxx
CORBADO_PROJECT_API_SECRET=corbado1_secret
CORBADO_FRONTEND_API=https://[projectId].frontendapi.corbado.io
CORBADO_BACKEND_API=https://backendapi.cloud.corbado.io
8 changes: 4 additions & 4 deletions examples/identifier/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { Config, SDK } from '@corbado/node-sdk';

const router = express.Router();
const config = new Config(
'pro-1',
'corbado1_hALCgZhe3oSwec8Hr2ZuF9w4DZAo9w',
'https://pro-1.frontendapi.corbado-dev.io',
'http://localhost:15902',
process.env.CORBADO_PROJECT_ID,
process.env.CORBADO_PROJECT_API_SECRET,
process.env.CORBADO_FRONTEND_API,
process.env.CORBADO_BACKEND_API,
);
const sdk = new SDK(config);

Expand Down
9 changes: 4 additions & 5 deletions examples/session/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ import express from 'express';
import { Config, SDK } from '@corbado/node-sdk';

const router = express.Router();

const config = new Config(
'pro-1',
'corbado1_hALCgZhe3oSwec8Hr2ZuF9w4DZAo9w',
'https://pro-1.frontendapi.corbado-dev.io',
'http://localhost:15902',
process.env.CORBADO_PROJECT_ID,
process.env.CORBADO_PROJECT_API_SECRET,
process.env.CORBADO_FRONTEND_API,
process.env.CORBADO_BACKEND_API,
);
const sdk = new SDK(config);

Expand Down
8 changes: 4 additions & 4 deletions examples/user/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { Config, SDK } from '@corbado/node-sdk';

const router = express.Router();
const config = new Config(
'pro-1',
'corbado1_hALCgZhe3oSwec8Hr2ZuF9w4DZAo9w',
'https://pro-1.frontendapi.corbado-dev.io',
'http://localhost:15902',
process.env.CORBADO_PROJECT_ID,
process.env.CORBADO_PROJECT_API_SECRET,
process.env.CORBADO_FRONTEND_API,
process.env.CORBADO_BACKEND_API,
);
const sdk = new SDK(config);

Expand Down

0 comments on commit 5e6e0fc

Please sign in to comment.