@entropic-bond/firebase-admin 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/server-auth/firebase-server-auth.js +2 -1
- package/lib/server-auth/firebase-server-auth.js.map +1 -1
- package/lib/server-auth/firebase-server-auth.spec.d.ts +1 -0
- package/lib/server-auth/firebase-server-auth.spec.js +18 -0
- package/lib/server-auth/firebase-server-auth.spec.js.map +1 -0
- package/package.json +2 -2
|
@@ -19,7 +19,8 @@ class FirebaseServerAuth extends entropic_bond_1.ServerAuthService {
|
|
|
19
19
|
return this.convertToUserCredentials(yield firebase_admin_helper_1.FirebaseAdminHelper.instance.auth().getUser(userId));
|
|
20
20
|
}
|
|
21
21
|
catch (error) {
|
|
22
|
-
|
|
22
|
+
console.log(error);
|
|
23
|
+
if (error.code === 'auth/user-not-found')
|
|
23
24
|
return undefined;
|
|
24
25
|
else
|
|
25
26
|
throw new Error(error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firebase-server-auth.js","sourceRoot":"","sources":["../../src/server-auth/firebase-server-auth.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAAqF;AAErF,oEAA8D;AAE9D,MAAa,kBAAmB,SAAQ,iCAAiB;IAElD,OAAO,CAAE,MAAc;;YAC5B,IAAI;gBACH,OAAO,IAAI,CAAC,wBAAwB,CACnC,MAAM,2CAAmB,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,OAAO,CAAE,MAAM,CAAE,CAC3D,CAAA;aACD;YAAC,OAAQ,KAAK,EAAG;gBACjB,IAAK,KAAK,KAAK,qBAAqB;oBAAG,OAAO,SAAS,CAAA;;
|
|
1
|
+
{"version":3,"file":"firebase-server-auth.js","sourceRoot":"","sources":["../../src/server-auth/firebase-server-auth.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAAqF;AAErF,oEAA8D;AAE9D,MAAa,kBAAmB,SAAQ,iCAAiB;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;SACjC,CAAA;IACF,CAAC;CACD;AArCD,gDAqCC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const entropic_bond_1 = require("entropic-bond");
|
|
4
|
+
const firebase_admin_helper_1 = require("../firebase-admin-helper");
|
|
5
|
+
const firebase_server_auth_1 = require("./firebase-server-auth");
|
|
6
|
+
describe.skip('Firebase Server Auth', () => {
|
|
7
|
+
firebase_admin_helper_1.FirebaseAdminHelper.setFirebaseConfig({
|
|
8
|
+
projectId: "demo-test",
|
|
9
|
+
});
|
|
10
|
+
beforeEach(() => {
|
|
11
|
+
entropic_bond_1.ServerAuth.useServerAuthService(new firebase_server_auth_1.FirebaseServerAuth());
|
|
12
|
+
});
|
|
13
|
+
it('should not throw if user not found', (done) => {
|
|
14
|
+
expect.assertions(1);
|
|
15
|
+
expect(() => entropic_bond_1.ServerAuth.instance.getUser('non-existing-user-id').finally(done)).not.toThrow();
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=firebase-server-auth.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"firebase-server-auth.spec.js","sourceRoot":"","sources":["../../src/server-auth/firebase-server-auth.spec.ts"],"names":[],"mappings":";;AAAA,iDAA0C;AAC1C,oEAA8D;AAC9D,iEAA2D;AAE3D,QAAQ,CAAC,IAAI,CAAE,sBAAsB,EAAE,GAAE,EAAE;IAC1C,2CAAmB,CAAC,iBAAiB,CAAC;QACrC,SAAS,EAAE,WAAW;KACtB,CAAC,CAAA;IAEF,UAAU,CAAC,GAAE,EAAE;QACd,0BAAU,CAAC,oBAAoB,CAAE,IAAI,yCAAkB,EAAE,CAAE,CAAA;IAC5D,CAAC,CAAC,CAAA;IAEF,EAAE,CAAE,oCAAoC,EAAE,CAAE,IAAI,EAAE,EAAE;QACnD,MAAM,CAAC,UAAU,CAAE,CAAC,CAAE,CAAA;QACtB,MAAM,CACL,GAAE,EAAE,CAAC,0BAAU,CAAC,QAAQ,CAAC,OAAO,CAAE,sBAAsB,CAAE,CAAC,OAAO,CAAE,IAAI,CAAE,CAC1E,CAAC,GAAG,CAAC,OAAO,EAAE,CAAA;IAChB,CAAC,CAAC,CAAA;AACH,CAAC,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@entropic-bond/firebase-admin",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"branches": [
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"typescript": "^4.8.4"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"entropic-bond": "^1.
|
|
61
|
+
"entropic-bond": "^1.32.0",
|
|
62
62
|
"firebase-admin": "^11.0.1"
|
|
63
63
|
},
|
|
64
64
|
"husky": {
|