pwa-auth 3.4.8 → 3.5.1
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/LICENSES.txt +36 -15
- package/README.md +547 -311
- package/base/api/drawer.d.ts +4 -0
- package/base/api/drawer.d.ts.map +1 -0
- package/base/api/drawer.js +12 -0
- package/base/api/drawer.js.map +1 -0
- package/base/api/user.d.ts +4 -0
- package/base/api/user.d.ts.map +1 -0
- package/base/api/user.js +25 -0
- package/base/api/user.js.map +1 -0
- package/base/api/verify.d.ts +4 -0
- package/base/api/verify.d.ts.map +1 -0
- package/base/api/verify.js +113 -0
- package/base/api/verify.js.map +1 -0
- package/base/deprecated/email-changed.d.ts +5 -0
- package/base/deprecated/email-changed.d.ts.map +1 -0
- package/base/deprecated/email-changed.js +9 -0
- package/base/deprecated/email-changed.js.map +1 -0
- package/base/events/emit.d.ts +12 -0
- package/base/events/emit.d.ts.map +1 -0
- package/base/events/emit.js +30 -0
- package/base/events/emit.js.map +1 -0
- package/base/events/names.d.ts +31 -0
- package/base/events/names.d.ts.map +1 -0
- package/base/events/names.js +31 -0
- package/base/events/names.js.map +1 -0
- package/base/events/types.d.ts +71 -0
- package/base/events/types.d.ts.map +1 -0
- package/base/events/types.js +2 -0
- package/base/events/types.js.map +1 -0
- package/base/export/pwa-auth.d.ts +17 -7
- package/base/export/pwa-auth.d.ts.map +1 -0
- package/base/export/pwa-auth.js +13 -7
- package/base/export/pwa-auth.js.map +1 -1
- package/base/firebase/attribute.d.ts +2 -0
- package/base/firebase/attribute.d.ts.map +1 -0
- package/base/firebase/attribute.js +17 -0
- package/base/firebase/attribute.js.map +1 -0
- package/base/firebase/authentication.d.ts +21 -10
- package/base/firebase/authentication.d.ts.map +1 -0
- package/base/firebase/authentication.js +65 -8
- package/base/firebase/authentication.js.map +1 -1
- package/base/firebase/interface.d.ts +7 -1
- package/base/firebase/interface.d.ts.map +1 -0
- package/base/firebase/interface.js +99 -68
- package/base/firebase/interface.js.map +1 -1
- package/base/firebase/message.d.ts +2 -0
- package/base/firebase/message.d.ts.map +1 -0
- package/base/firebase/message.js +34 -0
- package/base/firebase/message.js.map +1 -0
- package/base/firebase/password.d.ts +11 -0
- package/base/firebase/password.d.ts.map +1 -0
- package/base/firebase/password.js +16 -0
- package/base/firebase/password.js.map +1 -0
- package/base/lazyLoader.d.ts +1 -0
- package/base/lazyLoader.d.ts.map +1 -0
- package/base/redux/backend.d.ts +1 -0
- package/base/redux/backend.d.ts.map +1 -0
- package/base/redux/backend.js +1 -1
- package/base/redux/backend.js.map +1 -1
- package/base/redux/frontend.d.ts +16 -1
- package/base/redux/frontend.d.ts.map +1 -0
- package/base/redux/frontend.js +6 -3
- package/base/redux/frontend.js.map +1 -1
- package/base/store.d.ts +1 -6
- package/base/store.d.ts.map +1 -0
- package/base/store.js +2 -4
- package/base/store.js.map +1 -1
- package/base/webcomponents/css/animation.d.ts +1 -0
- package/base/webcomponents/css/animation.d.ts.map +1 -0
- package/base/webcomponents/css/animation.js +79 -67
- package/base/webcomponents/css/animation.js.map +1 -1
- package/base/webcomponents/css/svg.d.ts +1 -2
- package/base/webcomponents/css/svg.d.ts.map +1 -0
- package/base/webcomponents/css/svg.js +2 -4
- package/base/webcomponents/css/svg.js.map +1 -1
- package/base/webcomponents/css/tap.d.ts +3 -0
- package/base/webcomponents/css/tap.d.ts.map +1 -0
- package/base/webcomponents/css/tap.js +9 -0
- package/base/webcomponents/css/tap.js.map +1 -0
- package/base/webcomponents/css/toggle.d.ts +1 -0
- package/base/webcomponents/css/toggle.d.ts.map +1 -0
- package/base/webcomponents/css/toggle.js +5 -5
- package/base/webcomponents/drawer/css/drawer.d.ts +1 -0
- package/base/webcomponents/drawer/css/drawer.d.ts.map +1 -0
- package/base/webcomponents/drawer/css/drawer.js +101 -74
- package/base/webcomponents/drawer/css/drawer.js.map +1 -1
- package/base/webcomponents/drawer/css/exit.d.ts +1 -0
- package/base/webcomponents/drawer/css/exit.d.ts.map +1 -0
- package/base/webcomponents/drawer/css/exit.js +58 -52
- package/base/webcomponents/drawer/css/exit.js.map +1 -1
- package/base/webcomponents/drawer/css/link.d.ts +1 -0
- package/base/webcomponents/drawer/css/link.d.ts.map +1 -0
- package/base/webcomponents/drawer/css/link.js +9 -10
- package/base/webcomponents/drawer/css/link.js.map +1 -1
- package/base/webcomponents/drawer/css/paragraph.d.ts +1 -0
- package/base/webcomponents/drawer/css/paragraph.d.ts.map +1 -0
- package/base/webcomponents/drawer/css/paragraph.js +37 -20
- package/base/webcomponents/drawer/css/paragraph.js.map +1 -1
- package/base/webcomponents/drawer/drawer.d.ts +21 -7
- package/base/webcomponents/drawer/drawer.d.ts.map +1 -0
- package/base/webcomponents/drawer/drawer.js +292 -90
- package/base/webcomponents/drawer/drawer.js.map +1 -1
- package/base/webcomponents/drawer/keys.d.ts +4 -0
- package/base/webcomponents/drawer/keys.d.ts.map +1 -0
- package/base/webcomponents/drawer/keys.js +57 -0
- package/base/webcomponents/drawer/keys.js.map +1 -0
- package/base/webcomponents/form/css/button.d.ts +1 -0
- package/base/webcomponents/form/css/button.d.ts.map +1 -0
- package/base/webcomponents/form/css/button.js +69 -51
- package/base/webcomponents/form/css/button.js.map +1 -1
- package/base/webcomponents/form/css/input.d.ts +1 -0
- package/base/webcomponents/form/css/input.d.ts.map +1 -0
- package/base/webcomponents/form/css/input.js +22 -21
- package/base/webcomponents/form/css/input.js.map +1 -1
- package/base/webcomponents/form/css/label.d.ts +1 -0
- package/base/webcomponents/form/css/label.d.ts.map +1 -0
- package/base/webcomponents/form/css/label.js +22 -21
- package/base/webcomponents/form/css/label.js.map +1 -1
- package/base/webcomponents/form/css/list.d.ts +1 -0
- package/base/webcomponents/form/css/list.d.ts.map +1 -0
- package/base/webcomponents/form/css/list.js +19 -19
- package/base/webcomponents/form/css/notice.d.ts +3 -0
- package/base/webcomponents/form/css/notice.d.ts.map +1 -0
- package/base/webcomponents/form/css/notice.js +20 -0
- package/base/webcomponents/form/css/notice.js.map +1 -0
- package/base/webcomponents/form/css/status.d.ts +4 -0
- package/base/webcomponents/form/css/status.d.ts.map +1 -0
- package/base/webcomponents/form/css/status.js +44 -0
- package/base/webcomponents/form/css/status.js.map +1 -0
- package/base/webcomponents/form/css/toggle.d.ts +1 -0
- package/base/webcomponents/form/css/toggle.d.ts.map +1 -0
- package/base/webcomponents/form/css/toggle.js +43 -17
- package/base/webcomponents/form/css/toggle.js.map +1 -1
- package/base/webcomponents/form/draft.d.ts +5 -0
- package/base/webcomponents/form/draft.d.ts.map +1 -0
- package/base/webcomponents/form/draft.js +22 -0
- package/base/webcomponents/form/draft.js.map +1 -0
- package/base/webcomponents/form/forgot.d.ts +26 -3
- package/base/webcomponents/form/forgot.d.ts.map +1 -0
- package/base/webcomponents/form/forgot.js +297 -30
- package/base/webcomponents/form/forgot.js.map +1 -1
- package/base/webcomponents/form/letters.d.ts +3 -0
- package/base/webcomponents/form/letters.d.ts.map +1 -0
- package/base/webcomponents/form/letters.js +21 -0
- package/base/webcomponents/form/letters.js.map +1 -0
- package/base/webcomponents/form/login.d.ts +10 -0
- package/base/webcomponents/form/login.d.ts.map +1 -0
- package/base/webcomponents/form/login.js +221 -89
- package/base/webcomponents/form/login.js.map +1 -1
- package/base/webcomponents/form/notice.d.ts +4 -0
- package/base/webcomponents/form/notice.d.ts.map +1 -0
- package/base/webcomponents/form/notice.js +14 -0
- package/base/webcomponents/form/notice.js.map +1 -0
- package/base/webcomponents/form/reveal.d.ts +3 -0
- package/base/webcomponents/form/reveal.d.ts.map +1 -0
- package/base/webcomponents/form/reveal.js +14 -0
- package/base/webcomponents/form/reveal.js.map +1 -0
- package/base/webcomponents/form/signup.d.ts +8 -0
- package/base/webcomponents/form/signup.d.ts.map +1 -0
- package/base/webcomponents/form/signup.js +201 -100
- package/base/webcomponents/form/signup.js.map +1 -1
- package/base/webcomponents/form/verified.d.ts +3 -0
- package/base/webcomponents/form/verified.d.ts.map +1 -0
- package/base/webcomponents/form/verified.js +45 -0
- package/base/webcomponents/form/verified.js.map +1 -0
- package/base/webcomponents/icon/css/icon.d.ts +1 -0
- package/base/webcomponents/icon/css/icon.d.ts.map +1 -0
- package/base/webcomponents/icon/css/icon.js +63 -49
- package/base/webcomponents/icon/css/icon.js.map +1 -1
- package/base/webcomponents/icon/icon.d.ts +6 -4
- package/base/webcomponents/icon/icon.d.ts.map +1 -0
- package/base/webcomponents/icon/icon.js +48 -27
- package/base/webcomponents/icon/icon.js.map +1 -1
- package/base/webcomponents/login/css/auth.d.ts +1 -0
- package/base/webcomponents/login/css/auth.d.ts.map +1 -0
- package/base/webcomponents/login/css/auth.js +37 -36
- package/base/webcomponents/login/css/auth.js.map +1 -1
- package/base/webcomponents/login/css/link.d.ts +1 -0
- package/base/webcomponents/login/css/link.d.ts.map +1 -0
- package/base/webcomponents/login/css/link.js +9 -10
- package/base/webcomponents/login/css/link.js.map +1 -1
- package/base/webcomponents/login/css/paragraph.d.ts +1 -0
- package/base/webcomponents/login/css/paragraph.d.ts.map +1 -0
- package/base/webcomponents/login/css/paragraph.js +8 -8
- package/base/webcomponents/login/page.d.ts +10 -6
- package/base/webcomponents/login/page.d.ts.map +1 -0
- package/base/webcomponents/login/page.js +96 -55
- package/base/webcomponents/login/page.js.map +1 -1
- package/base/webcomponents/settings/css/navigation.d.ts +1 -0
- package/base/webcomponents/settings/css/navigation.d.ts.map +1 -0
- package/base/webcomponents/settings/css/navigation.js +78 -68
- package/base/webcomponents/settings/css/navigation.js.map +1 -1
- package/base/webcomponents/settings/input/delete.d.ts +7 -6
- package/base/webcomponents/settings/input/delete.d.ts.map +1 -0
- package/base/webcomponents/settings/input/delete.js +135 -47
- package/base/webcomponents/settings/input/delete.js.map +1 -1
- package/base/webcomponents/settings/input/email.d.ts +7 -5
- package/base/webcomponents/settings/input/email.d.ts.map +1 -0
- package/base/webcomponents/settings/input/email.js +155 -50
- package/base/webcomponents/settings/input/email.js.map +1 -1
- package/base/webcomponents/settings/input/name.d.ts +8 -5
- package/base/webcomponents/settings/input/name.d.ts.map +1 -0
- package/base/webcomponents/settings/input/name.js +116 -53
- package/base/webcomponents/settings/input/name.js.map +1 -1
- package/base/webcomponents/settings/input/password.d.ts +8 -5
- package/base/webcomponents/settings/input/password.d.ts.map +1 -0
- package/base/webcomponents/settings/input/password.js +200 -103
- package/base/webcomponents/settings/input/password.js.map +1 -1
- package/base/webcomponents/settings/input/uploader.d.ts +8 -6
- package/base/webcomponents/settings/input/uploader.d.ts.map +1 -0
- package/base/webcomponents/settings/input/uploader.js +209 -170
- package/base/webcomponents/settings/input/uploader.js.map +1 -1
- package/base/webcomponents/settings/input/verify.d.ts +64 -0
- package/base/webcomponents/settings/input/verify.d.ts.map +1 -0
- package/base/webcomponents/settings/input/verify.js +272 -0
- package/base/webcomponents/settings/input/verify.js.map +1 -0
- package/base/webcomponents/settings/settings.d.ts +15 -10
- package/base/webcomponents/settings/settings.d.ts.map +1 -0
- package/base/webcomponents/settings/settings.js +226 -146
- package/base/webcomponents/settings/settings.js.map +1 -1
- package/firebase.md +107 -0
- package/intro.md +19 -0
- package/license +21 -21
- package/package.json +116 -85
- package/source/pwa-auth.js +1097 -404
- package/source/pwa-styles.css +50 -68
- package/base/redux/drawer.d.ts +0 -17
- package/base/redux/drawer.js +0 -22
- package/base/redux/drawer.js.map +0 -1
- package/demonstration/index.html +0 -99
- package/demonstration/pwa-styles.css +0 -77
- package/demonstration/styles.css +0 -77
- package/source/THIRD_PARTY_LICENSES.txt +0 -303
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../typescript/api/drawer.ts"],"names":[],"mappings":"AAIA,wBAAgB,UAAU,IAAI,IAAI,CAEjC;AAGD,wBAAgB,WAAW,IAAI,IAAI,CAElC;AAGD,wBAAgB,YAAY,IAAI,IAAI,CAEnC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { store } from '../store.js';
|
|
2
|
+
import { closeSign, openSign, toggleSign } from '../redux/frontend.js';
|
|
3
|
+
export function openDrawer() {
|
|
4
|
+
store.dispatch(openSign());
|
|
5
|
+
}
|
|
6
|
+
export function closeDrawer() {
|
|
7
|
+
store.dispatch(closeSign());
|
|
8
|
+
}
|
|
9
|
+
export function toggleDrawer() {
|
|
10
|
+
store.dispatch(toggleSign());
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=drawer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../typescript/api/drawer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGvE,MAAM,UAAU,UAAU;IACxB,KAAK,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC7B,CAAC;AAGD,MAAM,UAAU,WAAW;IACzB,KAAK,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAC;AAC9B,CAAC;AAGD,MAAM,UAAU,YAAY;IAC1B,KAAK,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../typescript/api/user.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAGlD,wBAAgB,cAAc,IAAI,OAAO,GAAG,IAAI,CAG/C;AAGD,wBAAgB,aAAa,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,GAAG,MAAM,IAAI,CAiBlF"}
|
package/base/api/user.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { onAuthStateChanged } from 'firebase/auth';
|
|
2
|
+
import { auth, isReady, onReady } from '../firebase/authentication.js';
|
|
3
|
+
import { toPwaUser } from '../events/emit.js';
|
|
4
|
+
export function getCurrentUser() {
|
|
5
|
+
if (!isReady())
|
|
6
|
+
return null;
|
|
7
|
+
return toPwaUser(auth.currentUser);
|
|
8
|
+
}
|
|
9
|
+
export function onUserChanged(callback) {
|
|
10
|
+
let stop;
|
|
11
|
+
let dropped = false;
|
|
12
|
+
onReady(() => {
|
|
13
|
+
if (dropped)
|
|
14
|
+
return;
|
|
15
|
+
stop = onAuthStateChanged(auth, (next) => {
|
|
16
|
+
callback(toPwaUser(next));
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
return () => {
|
|
20
|
+
dropped = true;
|
|
21
|
+
if (stop)
|
|
22
|
+
stop();
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=user.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.js","sourceRoot":"","sources":["../../typescript/api/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAI9C,MAAM,UAAU,cAAc;IAC5B,IAAI,CAAC,OAAO,EAAE;QAAE,OAAO,IAAI,CAAC;IAC5B,OAAO,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AACrC,CAAC;AAGD,MAAM,UAAU,aAAa,CAAC,QAAwC;IAEpE,IAAI,IAA8B,CAAC;IACnC,IAAI,OAAO,GAAG,KAAK,CAAC;IAEpB,OAAO,CAAC,GAAG,EAAE;QACX,IAAI,OAAO;YAAE,OAAO;QACpB,IAAI,GAAG,kBAAkB,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE;YACvC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;QAC5B,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,GAAG,EAAE;QACV,OAAO,GAAG,IAAI,CAAC;QACf,IAAI,IAAI;YAAE,IAAI,EAAE,CAAC;IACnB,CAAC,CAAC;AAEJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../typescript/api/verify.ts"],"names":[],"mappings":"AA0DA,wBAAsB,oBAAoB,CAAC,WAAW,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAwBjF;AAyCD,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,OAAO,CAAC,CAyBzD;AAGD,wBAAsB,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC,CAExD"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { onAuthStateChanged, sendEmailVerification } from 'firebase/auth';
|
|
2
|
+
import { auth, emailActionCodeSettings, isReady, onReady } from '../firebase/authentication.js';
|
|
3
|
+
import { pwaAuthError, pwaEmailVerified, pwaVerificationSent } from '../events/names.js';
|
|
4
|
+
import { emitWindow, toAuthError, toPwaUser } from '../events/emit.js';
|
|
5
|
+
import store from '../store.js';
|
|
6
|
+
import { accVerified } from '../redux/backend.js';
|
|
7
|
+
let trackedUid = '';
|
|
8
|
+
let trackedVerified = false;
|
|
9
|
+
let watching = false;
|
|
10
|
+
function remember(user) {
|
|
11
|
+
if (!user) {
|
|
12
|
+
trackedUid = '';
|
|
13
|
+
trackedVerified = false;
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
const verified = user.emailVerified === true;
|
|
17
|
+
if (user.uid !== trackedUid) {
|
|
18
|
+
trackedUid = user.uid;
|
|
19
|
+
trackedVerified = verified;
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
if (!trackedVerified && verified) {
|
|
23
|
+
trackedVerified = true;
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
trackedVerified = verified;
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
function announce(user) {
|
|
30
|
+
store.dispatch(accVerified(true));
|
|
31
|
+
const person = toPwaUser({ ...user, emailVerified: true });
|
|
32
|
+
if (person)
|
|
33
|
+
emitWindow(pwaEmailVerified, { user: person });
|
|
34
|
+
}
|
|
35
|
+
export async function refreshEmailVerified(reportError) {
|
|
36
|
+
if (!isReady())
|
|
37
|
+
return false;
|
|
38
|
+
const current = auth.currentUser;
|
|
39
|
+
if (!current) {
|
|
40
|
+
remember(null);
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
try {
|
|
44
|
+
await current.reload();
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
if (reportError)
|
|
48
|
+
emitWindow(pwaAuthError, toAuthError(error));
|
|
49
|
+
return current.emailVerified === true;
|
|
50
|
+
}
|
|
51
|
+
store.dispatch(accVerified(current.emailVerified === true));
|
|
52
|
+
if (remember(current))
|
|
53
|
+
announce(current);
|
|
54
|
+
return current.emailVerified === true;
|
|
55
|
+
}
|
|
56
|
+
function onFocus() {
|
|
57
|
+
void refreshEmailVerified(false);
|
|
58
|
+
}
|
|
59
|
+
function onVisible() {
|
|
60
|
+
if (document.visibilityState === 'visible')
|
|
61
|
+
void refreshEmailVerified(false);
|
|
62
|
+
}
|
|
63
|
+
function watchEmailVerified() {
|
|
64
|
+
if (watching)
|
|
65
|
+
return;
|
|
66
|
+
watching = true;
|
|
67
|
+
onReady(() => {
|
|
68
|
+
onAuthStateChanged(auth, (user) => {
|
|
69
|
+
if (user && remember(user))
|
|
70
|
+
announce(user);
|
|
71
|
+
if (!user)
|
|
72
|
+
remember(null);
|
|
73
|
+
});
|
|
74
|
+
if (typeof window === 'undefined')
|
|
75
|
+
return;
|
|
76
|
+
window.addEventListener('focus', onFocus);
|
|
77
|
+
document.addEventListener('visibilitychange', onVisible);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
watchEmailVerified();
|
|
81
|
+
function fail(code, message) {
|
|
82
|
+
const detail = { code, message };
|
|
83
|
+
emitWindow(pwaAuthError, detail);
|
|
84
|
+
throw Object.assign(new Error(message), detail);
|
|
85
|
+
}
|
|
86
|
+
export async function sendVerification() {
|
|
87
|
+
if (!isReady())
|
|
88
|
+
fail('pwa/not-ready', 'Sign-in is not ready yet.');
|
|
89
|
+
const current = auth.currentUser;
|
|
90
|
+
if (!current)
|
|
91
|
+
fail('pwa/signed-out', 'Sign in first.');
|
|
92
|
+
if (!current.email)
|
|
93
|
+
fail('pwa/missing-email', 'Enter an email address.');
|
|
94
|
+
if (current.emailVerified)
|
|
95
|
+
return false;
|
|
96
|
+
const settings = emailActionCodeSettings();
|
|
97
|
+
try {
|
|
98
|
+
if (settings)
|
|
99
|
+
await sendEmailVerification(current, settings);
|
|
100
|
+
else
|
|
101
|
+
await sendEmailVerification(current);
|
|
102
|
+
}
|
|
103
|
+
catch (error) {
|
|
104
|
+
emitWindow(pwaAuthError, toAuthError(error));
|
|
105
|
+
throw error;
|
|
106
|
+
}
|
|
107
|
+
emitWindow(pwaVerificationSent, { email: current.email });
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
export async function isEmailVerified() {
|
|
111
|
+
return refreshEmailVerified(true);
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=verify.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify.js","sourceRoot":"","sources":["../../typescript/api/verify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAE1E,OAAO,EAAE,IAAI,EAAE,uBAAuB,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAChG,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,KAAK,MAAM,aAAa,CA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,OAAO,oBAAoB,CAAC,IAAI,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PwaEmailChangedDetail } from '../events/types.js';
|
|
2
|
+
/** @deprecated Optional - window event userEmailChanged. Required - listen for pwa-email-changed. */
|
|
3
|
+
export declare const userEmailChanged = "userEmailChanged";
|
|
4
|
+
export declare function emitLegacyEmailChanged(detail: PwaEmailChangedDetail): void;
|
|
5
|
+
//# sourceMappingURL=email-changed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email-changed.d.ts","sourceRoot":"","sources":["../../typescript/deprecated/email-changed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAGhE,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AAGnD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,qBAAqB,GAAG,IAAI,CAQ1E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email-changed.js","sourceRoot":"","sources":["../../typescript/deprecated/email-changed.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;AAGnD,MAAM,UAAU,sBAAsB,CAAC,MAA6B;IAElE,MAAM,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,gBAAgB,EAAE;QACrD,MAAM;QACN,OAAO,EAAG,IAAI;QACd,QAAQ,EAAE,IAAI;KACf,CAAC,CAAC,CAAC;AAEN,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PwaAuthErrorDetail, PwaUser } from './types.js';
|
|
2
|
+
export declare function toPwaUser(user: {
|
|
3
|
+
uid: string;
|
|
4
|
+
displayName: string | null;
|
|
5
|
+
email: string | null;
|
|
6
|
+
photoURL: string | null;
|
|
7
|
+
emailVerified?: boolean;
|
|
8
|
+
} | null): PwaUser | null;
|
|
9
|
+
export declare function emitWindow<T>(name: string, detail: T): void;
|
|
10
|
+
export declare function emitElement<T>(target: EventTarget, name: string, detail: T): void;
|
|
11
|
+
export declare function toAuthError(error: unknown): PwaAuthErrorDetail;
|
|
12
|
+
//# sourceMappingURL=emit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emit.d.ts","sourceRoot":"","sources":["../../typescript/events/emit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAM9D,wBAAgB,SAAS,CAAC,IAAI,EAAE;IAC9B,GAAG,EAAa,MAAM,CAAC;IACvB,WAAW,EAAK,MAAM,GAAG,IAAI,CAAC;IAC9B,KAAK,EAAW,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,EAAQ,MAAM,GAAG,IAAI,CAAC;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,GAAG,IAAI,GAAG,OAAO,GAAG,IAAI,CAYxB;AAGD,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,CAE3D;AAGD,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,CAEjF;AAGD,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,CAa9D"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const travel = { bubbles: true, composed: true };
|
|
2
|
+
export function toPwaUser(user) {
|
|
3
|
+
if (!user)
|
|
4
|
+
return null;
|
|
5
|
+
return {
|
|
6
|
+
uid: user.uid,
|
|
7
|
+
displayName: user.displayName,
|
|
8
|
+
email: user.email,
|
|
9
|
+
photoURL: user.photoURL,
|
|
10
|
+
emailVerified: user.emailVerified === true
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export function emitWindow(name, detail) {
|
|
14
|
+
window.dispatchEvent(new CustomEvent(name, { ...travel, detail }));
|
|
15
|
+
}
|
|
16
|
+
export function emitElement(target, name, detail) {
|
|
17
|
+
target.dispatchEvent(new CustomEvent(name, { ...travel, detail }));
|
|
18
|
+
}
|
|
19
|
+
export function toAuthError(error) {
|
|
20
|
+
if (typeof error === 'object' && error !== null && 'code' in error) {
|
|
21
|
+
const code = String(error.code);
|
|
22
|
+
const message = error instanceof Error ? error.message : code;
|
|
23
|
+
return { code, message };
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
code: 'pwa/unknown',
|
|
27
|
+
message: error instanceof Error ? error.message : 'Authentication failed'
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=emit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emit.js","sourceRoot":"","sources":["../../typescript/events/emit.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAGjD,MAAM,UAAU,SAAS,CAAC,IAMlB;IAEN,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IAEvB,OAAO;QACL,GAAG,EAAa,IAAI,CAAC,GAAG;QACxB,WAAW,EAAK,IAAI,CAAC,WAAW;QAChC,KAAK,EAAW,IAAI,CAAC,KAAK;QAC1B,QAAQ,EAAQ,IAAI,CAAC,QAAQ;QAC7B,aAAa,EAAG,IAAI,CAAC,aAAa,KAAK,IAAI;KAC5C,CAAC;AAEJ,CAAC;AAGD,MAAM,UAAU,UAAU,CAAI,IAAY,EAAE,MAAS;IACnD,MAAM,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,IAAI,EAAE,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;AACrE,CAAC;AAGD,MAAM,UAAU,WAAW,CAAI,MAAmB,EAAE,IAAY,EAAE,MAAS;IACzE,MAAM,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,IAAI,EAAE,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;AACrE,CAAC;AAGD,MAAM,UAAU,WAAW,CAAC,KAAc;IAExC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,MAAM,IAAI,KAAK,EAAE,CAAC;QACnE,MAAM,IAAI,GAAG,MAAM,CAAE,KAA2B,CAAC,IAAI,CAAC,CAAC;QACvD,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;QAC9D,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;IAC3B,CAAC;IAED,OAAO;QACL,IAAI,EAAM,aAAa;QACvB,OAAO,EAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,uBAAuB;KAC3E,CAAC;AAEJ,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const pwaAuthChanged = "pwa-auth-changed";
|
|
2
|
+
export declare const pwaLogin = "pwa-login";
|
|
3
|
+
export declare const pwaLogout = "pwa-logout";
|
|
4
|
+
export declare const pwaSignup = "pwa-signup";
|
|
5
|
+
export declare const pwaAccountDeleted = "pwa-account-deleted";
|
|
6
|
+
export declare const pwaProfileUpdated = "pwa-profile-updated";
|
|
7
|
+
export declare const pwaEmailChanged = "pwa-email-changed";
|
|
8
|
+
export declare const pwaPasswordChanged = "pwa-password-changed";
|
|
9
|
+
export declare const pwaResetSent = "pwa-reset-sent";
|
|
10
|
+
export declare const pwaDrawerToggleName = "pwa-drawer-toggle";
|
|
11
|
+
export declare const pwaSettings = "pwa-settings";
|
|
12
|
+
export declare const pwaAuthError = "pwa-auth-error";
|
|
13
|
+
export declare const pwaVerificationSent = "pwa-verification-sent";
|
|
14
|
+
export declare const pwaEmailVerified = "pwa-email-verified";
|
|
15
|
+
export declare const eventName: {
|
|
16
|
+
readonly authChanged: "pwa-auth-changed";
|
|
17
|
+
readonly login: "pwa-login";
|
|
18
|
+
readonly logout: "pwa-logout";
|
|
19
|
+
readonly signup: "pwa-signup";
|
|
20
|
+
readonly accountDeleted: "pwa-account-deleted";
|
|
21
|
+
readonly profileUpdated: "pwa-profile-updated";
|
|
22
|
+
readonly emailChanged: "pwa-email-changed";
|
|
23
|
+
readonly passwordChanged: "pwa-password-changed";
|
|
24
|
+
readonly resetSent: "pwa-reset-sent";
|
|
25
|
+
readonly drawerToggle: "pwa-drawer-toggle";
|
|
26
|
+
readonly settings: "pwa-settings";
|
|
27
|
+
readonly authError: "pwa-auth-error";
|
|
28
|
+
readonly verificationSent: "pwa-verification-sent";
|
|
29
|
+
readonly emailVerified: "pwa-email-verified";
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=names.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"names.d.ts","sourceRoot":"","sources":["../../typescript/events/names.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,cAAc,qBAAqB,CAAC;AAGjD,eAAO,MAAM,QAAQ,cAAc,CAAC;AAGpC,eAAO,MAAM,SAAS,eAAe,CAAC;AAGtC,eAAO,MAAM,SAAS,eAAe,CAAC;AAGtC,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AAGvD,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AAGvD,eAAO,MAAM,eAAe,sBAAsB,CAAC;AAGnD,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AAGzD,eAAO,MAAM,YAAY,mBAAmB,CAAC;AAG7C,eAAO,MAAM,mBAAmB,sBAAsB,CAAC;AAGvD,eAAO,MAAM,WAAW,iBAAiB,CAAC;AAG1C,eAAO,MAAM,YAAY,mBAAmB,CAAC;AAG7C,eAAO,MAAM,mBAAmB,0BAA0B,CAAC;AAG3D,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AAGrD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;CAeZ,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export const pwaAuthChanged = 'pwa-auth-changed';
|
|
2
|
+
export const pwaLogin = 'pwa-login';
|
|
3
|
+
export const pwaLogout = 'pwa-logout';
|
|
4
|
+
export const pwaSignup = 'pwa-signup';
|
|
5
|
+
export const pwaAccountDeleted = 'pwa-account-deleted';
|
|
6
|
+
export const pwaProfileUpdated = 'pwa-profile-updated';
|
|
7
|
+
export const pwaEmailChanged = 'pwa-email-changed';
|
|
8
|
+
export const pwaPasswordChanged = 'pwa-password-changed';
|
|
9
|
+
export const pwaResetSent = 'pwa-reset-sent';
|
|
10
|
+
export const pwaDrawerToggleName = 'pwa-drawer-toggle';
|
|
11
|
+
export const pwaSettings = 'pwa-settings';
|
|
12
|
+
export const pwaAuthError = 'pwa-auth-error';
|
|
13
|
+
export const pwaVerificationSent = 'pwa-verification-sent';
|
|
14
|
+
export const pwaEmailVerified = 'pwa-email-verified';
|
|
15
|
+
export const eventName = {
|
|
16
|
+
authChanged: pwaAuthChanged,
|
|
17
|
+
login: pwaLogin,
|
|
18
|
+
logout: pwaLogout,
|
|
19
|
+
signup: pwaSignup,
|
|
20
|
+
accountDeleted: pwaAccountDeleted,
|
|
21
|
+
profileUpdated: pwaProfileUpdated,
|
|
22
|
+
emailChanged: pwaEmailChanged,
|
|
23
|
+
passwordChanged: pwaPasswordChanged,
|
|
24
|
+
resetSent: pwaResetSent,
|
|
25
|
+
drawerToggle: pwaDrawerToggleName,
|
|
26
|
+
settings: pwaSettings,
|
|
27
|
+
authError: pwaAuthError,
|
|
28
|
+
verificationSent: pwaVerificationSent,
|
|
29
|
+
emailVerified: pwaEmailVerified
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=names.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"names.js","sourceRoot":"","sources":["../../typescript/events/names.ts"],"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
|
+
displayName: string | null;
|
|
4
|
+
email: string | null;
|
|
5
|
+
photoURL: string | null;
|
|
6
|
+
emailVerified: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface PwaAuthChangedDetail {
|
|
9
|
+
user: PwaUser | null;
|
|
10
|
+
}
|
|
11
|
+
export interface PwaLoginDetail {
|
|
12
|
+
user: PwaUser;
|
|
13
|
+
}
|
|
14
|
+
export interface PwaLogoutDetail {
|
|
15
|
+
user: null;
|
|
16
|
+
}
|
|
17
|
+
export interface PwaSignupDetail {
|
|
18
|
+
user: PwaUser;
|
|
19
|
+
}
|
|
20
|
+
export interface PwaAccountDeletedDetail {
|
|
21
|
+
uid: string;
|
|
22
|
+
}
|
|
23
|
+
export interface PwaProfileUpdatedDetail {
|
|
24
|
+
uid: string;
|
|
25
|
+
displayName: string | null;
|
|
26
|
+
photoURL: string | null;
|
|
27
|
+
}
|
|
28
|
+
export interface PwaEmailChangedDetail {
|
|
29
|
+
email: string;
|
|
30
|
+
}
|
|
31
|
+
export interface PwaPasswordChangedDetail {
|
|
32
|
+
uid: string;
|
|
33
|
+
}
|
|
34
|
+
export interface PwaResetSentDetail {
|
|
35
|
+
email: string;
|
|
36
|
+
}
|
|
37
|
+
export interface PwaDrawerToggleDetail {
|
|
38
|
+
open: boolean;
|
|
39
|
+
}
|
|
40
|
+
export interface PwaSettingsDetail {
|
|
41
|
+
url: string;
|
|
42
|
+
}
|
|
43
|
+
export interface PwaAuthErrorDetail {
|
|
44
|
+
code: string;
|
|
45
|
+
message: string;
|
|
46
|
+
}
|
|
47
|
+
export interface PwaEventMap {
|
|
48
|
+
'pwa-auth-changed': CustomEvent<PwaAuthChangedDetail>;
|
|
49
|
+
'pwa-login': CustomEvent<PwaLoginDetail>;
|
|
50
|
+
'pwa-logout': CustomEvent<PwaLogoutDetail>;
|
|
51
|
+
'pwa-signup': CustomEvent<PwaSignupDetail>;
|
|
52
|
+
'pwa-account-deleted': CustomEvent<PwaAccountDeletedDetail>;
|
|
53
|
+
'pwa-profile-updated': CustomEvent<PwaProfileUpdatedDetail>;
|
|
54
|
+
'pwa-email-changed': CustomEvent<PwaEmailChangedDetail>;
|
|
55
|
+
'pwa-password-changed': CustomEvent<PwaPasswordChangedDetail>;
|
|
56
|
+
'pwa-reset-sent': CustomEvent<PwaResetSentDetail>;
|
|
57
|
+
'pwa-drawer-toggle': CustomEvent<PwaDrawerToggleDetail>;
|
|
58
|
+
'pwa-settings': CustomEvent<PwaSettingsDetail>;
|
|
59
|
+
'pwa-auth-error': CustomEvent<PwaAuthErrorDetail>;
|
|
60
|
+
}
|
|
61
|
+
export interface PwaVerificationSentDetail {
|
|
62
|
+
email: string;
|
|
63
|
+
}
|
|
64
|
+
export interface PwaEmailVerifiedDetail {
|
|
65
|
+
user: PwaUser;
|
|
66
|
+
}
|
|
67
|
+
export interface PwaEventMap {
|
|
68
|
+
'pwa-verification-sent': CustomEvent<PwaVerificationSentDetail>;
|
|
69
|
+
'pwa-email-verified': CustomEvent<PwaEmailVerifiedDetail>;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../typescript/events/types.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,OAAO;IACtB,GAAG,EAAa,MAAM,CAAC;IACvB,WAAW,EAAK,MAAM,GAAG,IAAI,CAAC;IAC9B,KAAK,EAAW,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,EAAQ,MAAM,GAAG,IAAI,CAAC;IAC9B,aAAa,EAAG,OAAO,CAAC;CACzB;AAGD,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;CACtB;AAGD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,OAAO,CAAC;CACf;AAGD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,IAAI,CAAC;CACZ;AAGD,MAAM,WAAW,eAAe;IAC9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AC,CAAC;IACvD,gBAAgB,EAAQ,WAAW,CAAC,kBAAkB,CAAC,CAAC;CACzD;AAGD,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,MAAM,CAAC;CACf;AAGD,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,OAAO,CAAC;CACf;AAGD,MAAM,WAAW,WAAW;IAC1B,uBAAuB,EAAG,WAAW,CAAC,yBAAyB,CAAC,CAAC;IACjE,oBAAoB,EAAM,WAAW,CAAC,sBAAsB,CAAC,CAAC;CAC/D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../typescript/events/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
export { UserLogin } from '../webcomponents/login/page';
|
|
2
|
-
export { UserDrawer } from '../webcomponents/drawer/drawer';
|
|
3
|
-
export { UserSettings } from '../webcomponents/settings/settings';
|
|
4
|
-
export { UserIcon } from '../webcomponents/icon/icon';
|
|
5
|
-
export { EmailReset } from '../webcomponents/form/forgot';
|
|
6
|
-
export { firebaseConfig, application, db, storage, auth, user } from '../firebase/authentication';
|
|
7
|
-
export {
|
|
1
|
+
export { UserLogin } from '../webcomponents/login/page.js';
|
|
2
|
+
export { UserDrawer } from '../webcomponents/drawer/drawer.js';
|
|
3
|
+
export { UserSettings } from '../webcomponents/settings/settings.js';
|
|
4
|
+
export { UserIcon } from '../webcomponents/icon/icon.js';
|
|
5
|
+
export { EmailReset } from '../webcomponents/form/forgot.js';
|
|
6
|
+
export { firebaseConfig, application, db, storage, auth, user, initialize } from '../firebase/authentication.js';
|
|
7
|
+
export type { InitializeOptions } from '../firebase/authentication.js';
|
|
8
|
+
export { logOut, logAccount, logAccountDelete, deleteDocument, pwaDrawerToggle, reauthenticate } from "../firebase/interface.js";
|
|
9
|
+
export { getCurrentUser, onUserChanged } from '../api/user.js';
|
|
10
|
+
export { sendVerification, isEmailVerified } from '../api/verify.js';
|
|
11
|
+
export { openDrawer, closeDrawer, toggleDrawer } from '../api/drawer.js';
|
|
12
|
+
export { pwaAuthChanged, pwaLogin, pwaLogout, pwaSignup, pwaAccountDeleted, pwaProfileUpdated, pwaEmailChanged, pwaPasswordChanged, pwaResetSent, pwaDrawerToggleName, pwaSettings, pwaAuthError, eventName } from '../events/names.js';
|
|
13
|
+
export type { PwaUser, PwaAuthChangedDetail, PwaLoginDetail, PwaLogoutDetail, PwaSignupDetail, PwaAccountDeletedDetail, PwaProfileUpdatedDetail, PwaEmailChangedDetail, PwaPasswordChangedDetail, PwaResetSentDetail, PwaDrawerToggleDetail, PwaSettingsDetail, PwaAuthErrorDetail, PwaEventMap } from '../events/types.js';
|
|
14
|
+
export { userEmailChanged } from '../deprecated/email-changed.js';
|
|
15
|
+
export { pwaVerificationSent, pwaEmailVerified } from '../events/names.js';
|
|
16
|
+
export type { PwaVerificationSentDetail, PwaEmailVerifiedDetail } from '../events/types.js';
|
|
17
|
+
//# sourceMappingURL=pwa-auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pwa-auth.d.ts","sourceRoot":"","sources":["../../typescript/export/pwa-auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAiB,gCAAgC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAgB,mCAAmC,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAc,uCAAuC,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAkB,+BAA+B,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAgB,iCAAiC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AACjH,YAAY,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,gBAAgB,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AACjI,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,EACL,cAAc,EACd,QAAQ,EACR,SAAS,EACT,SAAS,EACT,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,EACnB,WAAW,EACX,YAAY,EACZ,SAAS,EACV,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,OAAO,EACP,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,eAAe,EACf,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3E,YAAY,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC"}
|
package/base/export/pwa-auth.js
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
export { UserLogin } from '../webcomponents/login/page';
|
|
2
|
-
export { UserDrawer } from '../webcomponents/drawer/drawer';
|
|
3
|
-
export { UserSettings } from '../webcomponents/settings/settings';
|
|
4
|
-
export { UserIcon } from '../webcomponents/icon/icon';
|
|
5
|
-
export { EmailReset } from '../webcomponents/form/forgot';
|
|
6
|
-
export { firebaseConfig, application, db, storage, auth, user } from '../firebase/authentication';
|
|
7
|
-
export { logOut, logAccount, logAccountDelete, deleteDocument, pwaDrawerToggle } from "../firebase/interface";
|
|
1
|
+
export { UserLogin } from '../webcomponents/login/page.js';
|
|
2
|
+
export { UserDrawer } from '../webcomponents/drawer/drawer.js';
|
|
3
|
+
export { UserSettings } from '../webcomponents/settings/settings.js';
|
|
4
|
+
export { UserIcon } from '../webcomponents/icon/icon.js';
|
|
5
|
+
export { EmailReset } from '../webcomponents/form/forgot.js';
|
|
6
|
+
export { firebaseConfig, application, db, storage, auth, user, initialize } from '../firebase/authentication.js';
|
|
7
|
+
export { logOut, logAccount, logAccountDelete, deleteDocument, pwaDrawerToggle, reauthenticate } from "../firebase/interface.js";
|
|
8
|
+
export { getCurrentUser, onUserChanged } from '../api/user.js';
|
|
9
|
+
export { sendVerification, isEmailVerified } from '../api/verify.js';
|
|
10
|
+
export { openDrawer, closeDrawer, toggleDrawer } from '../api/drawer.js';
|
|
11
|
+
export { pwaAuthChanged, pwaLogin, pwaLogout, pwaSignup, pwaAccountDeleted, pwaProfileUpdated, pwaEmailChanged, pwaPasswordChanged, pwaResetSent, pwaDrawerToggleName, pwaSettings, pwaAuthError, eventName } from '../events/names.js';
|
|
12
|
+
export { userEmailChanged } from '../deprecated/email-changed.js';
|
|
13
|
+
export { pwaVerificationSent, pwaEmailVerified } from '../events/names.js';
|
|
8
14
|
//# sourceMappingURL=pwa-auth.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pwa-auth.js","sourceRoot":"","sources":["../../typescript/export/pwa-auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAiB,
|
|
1
|
+
{"version":3,"file":"pwa-auth.js","sourceRoot":"","sources":["../../typescript/export/pwa-auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAiB,gCAAgC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAgB,mCAAmC,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAc,uCAAuC,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAkB,+BAA+B,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAgB,iCAAiC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAEjH,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,gBAAgB,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AACjI,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,EACL,cAAc,EACd,QAAQ,EACR,SAAS,EACT,SAAS,EACT,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,EACnB,WAAW,EACX,YAAY,EACZ,SAAS,EACV,MAAM,oBAAoB,CAAC;AAiB5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attribute.d.ts","sourceRoot":"","sources":["../../typescript/firebase/attribute.ts"],"names":[],"mappings":"AAMA,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,CAa3D"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { pwaAuthError } from '../events/names.js';
|
|
2
|
+
import { emitWindow, toAuthError } from '../events/emit.js';
|
|
3
|
+
import { initialize, isReady } from './authentication.js';
|
|
4
|
+
export function applyFirebaseConfig(host) {
|
|
5
|
+
if (isReady())
|
|
6
|
+
return;
|
|
7
|
+
const raw = host.getAttribute('firebase-config');
|
|
8
|
+
if (!raw)
|
|
9
|
+
return;
|
|
10
|
+
try {
|
|
11
|
+
initialize({ config: JSON.parse(raw) });
|
|
12
|
+
}
|
|
13
|
+
catch (error) {
|
|
14
|
+
emitWindow(pwaAuthError, toAuthError(error));
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=attribute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attribute.js","sourceRoot":"","sources":["../../typescript/firebase/attribute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAI1D,MAAM,UAAU,mBAAmB,CAAC,IAAiB;IAEnD,IAAI,OAAO,EAAE;QAAE,OAAO;IAEtB,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;IACjD,IAAI,CAAC,GAAG;QAAE,OAAO;IAEjB,IAAI,CAAC;QACH,UAAU,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAoB,EAAE,CAAC,CAAC;IAC7D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,UAAU,CAAC,YAAY,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;IAC/C,CAAC;AAEH,CAAC"}
|
|
@@ -1,10 +1,21 @@
|
|
|
1
|
-
import { FirebaseApp } from 'firebase/app';
|
|
2
|
-
import { Firestore } from
|
|
3
|
-
import { FirebaseStorage } from
|
|
4
|
-
import { User, Auth } from 'firebase/auth';
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export declare
|
|
1
|
+
import { FirebaseApp, FirebaseOptions } from 'firebase/app';
|
|
2
|
+
import { Firestore } from 'firebase/firestore';
|
|
3
|
+
import { FirebaseStorage } from 'firebase/storage';
|
|
4
|
+
import { User, Auth, type ActionCodeSettings } from 'firebase/auth';
|
|
5
|
+
export interface InitializeOptions {
|
|
6
|
+
app?: FirebaseApp;
|
|
7
|
+
config?: FirebaseOptions;
|
|
8
|
+
actionCodeSettings?: ActionCodeSettings;
|
|
9
|
+
}
|
|
10
|
+
export declare let firebaseConfig: FirebaseOptions;
|
|
11
|
+
export declare let application: FirebaseApp;
|
|
12
|
+
export declare let db: Firestore;
|
|
13
|
+
export declare let storage: FirebaseStorage;
|
|
14
|
+
export declare let auth: Auth;
|
|
15
|
+
/** @deprecated Optional - load-time snapshot. Required - read auth.currentUser at call time. */
|
|
16
|
+
export declare let user: User | null;
|
|
17
|
+
export declare function emailActionCodeSettings(): ActionCodeSettings | undefined;
|
|
18
|
+
export declare function isReady(): boolean;
|
|
19
|
+
export declare function onReady(fn: () => void): void;
|
|
20
|
+
export declare function initialize(options?: InitializeOptions): FirebaseApp;
|
|
21
|
+
//# sourceMappingURL=authentication.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authentication.d.ts","sourceRoot":"","sources":["../../typescript/firebase/authentication.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,WAAW,EAAE,eAAe,EAAE,MAAO,cAAc,CAAC;AAC5E,OAAO,EAAgB,SAAS,EAAE,MAA2B,oBAAoB,CAAC;AAClF,OAAO,EAAc,eAAe,EAAE,MAAuB,kBAAkB,CAAC;AAChF,OAAO,EAAW,IAAI,EAAE,IAAI,EAAE,KAAK,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAE7E,MAAM,WAAW,iBAAiB;IAEhC,GAAG,CAAC,EAAM,WAAW,CAAC;IAEtB,MAAM,CAAC,EAAG,eAAe,CAAC;IAE1B,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACzC;AAED,eAAO,IAAI,cAAc,EAAE,eAAoB,CAAC;AAChD,eAAO,IAAI,WAAW,EAAG,WAAW,CAAC;AACrC,eAAO,IAAI,EAAE,EAAG,SAAS,CAAC;AAC1B,eAAO,IAAI,OAAO,EAAG,eAAe,CAAC;AACrC,eAAO,IAAI,IAAI,EAAG,IAAI,CAAC;AAGvB,eAAO,IAAI,IAAI,EAAE,IAAI,GAAG,IAAW,CAAC;AAOpC,wBAAgB,uBAAuB,IAAI,kBAAkB,GAAG,SAAS,CAExE;AAGD,wBAAgB,OAAO,IAAI,OAAO,CAEjC;AAGD,wBAAgB,OAAO,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI,CAG5C;AAmBD,wBAAgB,UAAU,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,WAAW,CAiCnE"}
|