Skip to content

Commit 38215ac

Browse files
authored
Fix importing from Passage-Node (#152)
1 parent d00ae10 commit 38215ac

File tree

9 files changed

+1340
-37
lines changed

9 files changed

+1340
-37
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
npm run beachball-bump
3636
3737
- name: Build
38-
run: npm run set-version && npm run tsc
38+
run: npm run set-version && npm run build
3939

4040
- name: Clear Beachball Changes
4141
run: |

.github/workflows/on-pull-request.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,8 @@ jobs:
3030
run: |
3131
npm run beachball-check
3232
33+
- name: Build
34+
run: npm run set-version && npm run build
35+
3336
- name: Unit Test
3437
run: npm run test

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ node_modules/
22
.env
33
coverage/
44
.DS_STORE
5-
lib/
5+
lib/
6+
dist/

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ To authenticate an HTTP request, you can use the Passage SDK to check a request
1818
You need to provide Passage with your App ID in order to verify the JWTs.
1919

2020
```javascript
21-
import Passage from '@passageidentity/passage-node';
21+
import { Passage } from '@passageidentity/passage-node';
2222
import express from 'express';
2323

2424
const app = express();
@@ -62,7 +62,7 @@ app.listen(port, () => {
6262
To retrieve information about an app, you should use the `passage.getApp()` function.
6363

6464
```javascript
65-
import Passage from '@passageidentity/passage-node';
65+
import { Passage } from '@passageidentity/passage-node';
6666

6767
let passageConfig = {
6868
appID: 'YOUR_APP_ID',
@@ -78,7 +78,7 @@ let passageApp = await passage.getApp();
7878
To retrieve information about a user, you should use the `passage.user.get()` function. You will need to use a Passage API key, which can be created in the Passage Console under your Application Settings. This API key grants your web server access to the Passage management APIs to get and update information about users. This API key must be protected and stored in an appropriate secure storage location. It should never be hard-coded in the repository.
7979

8080
```javascript
81-
import Passage from '@passageidentity/passage-node';
81+
import { Passage } from '@passageidentity/passage-node';
8282
import express from 'express';
8383

8484
const app = express();
@@ -106,7 +106,7 @@ app.get('/authenticatedRoute', passageAuthMiddleware, async (req, res) => {
106106
To retrieve information about a user, you could also use the `passage.user.getUserByIdentifier()` function. You will need to use a Passage API key, which can be created in the Passage Console under your Application Settings. This API key grants your web server access to the Passage management APIs to get and update information about users. This API key must be protected and stored in an appropriate secure storage location. It should never be hard-coded in the repository.
107107

108108
```javascript
109-
import Passage from '@passageidentity/passage-node';
109+
import { Passage } from '@passageidentity/passage-node';
110110
import express from 'express';
111111

112112
const app = express();
@@ -134,7 +134,7 @@ app.get('/authenticatedRoute', passageAuthMiddleware, async (req, res) => {
134134
You can also activate or deactivate a user using the Passage SDK. These actions require an API Key and deactivating a user will prevent them from logging into your application with Passage.
135135

136136
```javascript
137-
import Passage from '@passageidentity/passage-node';
137+
import { Passage } from '@passageidentity/passage-node';
138138
import express from 'express';
139139

140140
const app = express();
@@ -162,7 +162,7 @@ app.get('/authenticatedRoute', passageAuthMiddleware, async (req, res) => {
162162
With the Passage SDK, you can update a User's attributes. These actions require an API Key and deactivating a user will prevent them from logging into your application with Passage.
163163

164164
```javascript
165-
import Passage from '@passageidentity/passage-node';
165+
import { Passage } from '@passageidentity/passage-node';
166166
import express from 'express';
167167

168168
const app = express();
@@ -198,7 +198,7 @@ app.get('/authenticatedRoute', passageAuthMiddleware, async (req, res) => {
198198
To delete a Passage user, you will need to provide the `userID`, and corresponding app credentials.
199199

200200
```javascript
201-
import Passage from '@passageidentity/passage-node';
201+
import { Passage } from '@passageidentity/passage-node';
202202
import express from 'express';
203203

204204
const app = express();
@@ -226,7 +226,7 @@ app.get('/authenticatedRoute', passageAuthMiddleware, async (req, res) => {
226226
You can also create a Passage user by providing an `email` or `phone` (phone number must be a valid E164 phone number).
227227

228228
```javascript
229-
import Passage from '@passageidentity/passage-node';
229+
import { Passage } from '@passageidentity/passage-node';
230230

231231
let passageConfig = {
232232
appID: 'YOUR_APP_ID',
@@ -254,7 +254,7 @@ console.log(newPassageUser2); // [userObject]
254254
You can also create a Passage magic link by providing a MagicLinkRequest type
255255

256256
```javascript
257-
import Passage from '@passageidentity/passage-node';
257+
import { Passage } from '@passageidentity/passage-node';
258258

259259
let passageConfig = {
260260
appID: 'YOUR_APP_ID',
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "minor",
3+
"comment": "New build that should work for a wider set of tools and frameworks",
4+
"packageName": "@passageidentity/passage-node",
5+
"email": "[email protected]",
6+
"dependentChangeType": "patch"
7+
}

0 commit comments

Comments
 (0)