pwa-auth 2.0.4 → 2.0.6

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.
Files changed (128) hide show
  1. package/CHANGELOG.md +20 -1
  2. package/README.md +61 -37
  3. package/demo/css/pwa-styles.css +77 -0
  4. package/demo/images/empty.jpg +0 -0
  5. package/demo/index.html +26 -130
  6. package/deploy/css/font.d.ts.map +1 -1
  7. package/deploy/css/form/button.d.ts.map +1 -1
  8. package/deploy/css/form/input.d.ts.map +1 -1
  9. package/deploy/css/form/label.d.ts.map +1 -1
  10. package/deploy/css/form/list.d.ts.map +1 -1
  11. package/deploy/css/svg.d.ts.map +1 -1
  12. package/deploy/css/toggle.d.ts.map +1 -1
  13. package/deploy/custom-elements/drawer/css/drawer.d.ts.map +1 -1
  14. package/deploy/custom-elements/drawer/css/exit.d.ts.map +1 -1
  15. package/deploy/custom-elements/drawer/css/link.d.ts.map +1 -1
  16. package/deploy/custom-elements/drawer/css/paragraph.d.ts.map +1 -1
  17. package/deploy/custom-elements/drawer/css/toggle.d.ts.map +1 -1
  18. package/deploy/custom-elements/drawer/drawer.d.ts.map +1 -1
  19. package/deploy/custom-elements/drawer/drawer.js +1 -1
  20. package/deploy/custom-elements/drawer/input/forgot.d.ts.map +1 -1
  21. package/deploy/custom-elements/drawer/input/forgot.js +1 -1
  22. package/deploy/custom-elements/drawer/input/login.d.ts.map +1 -1
  23. package/deploy/custom-elements/drawer/input/login.js +1 -1
  24. package/deploy/custom-elements/drawer/input/sign-up.d.ts.map +1 -1
  25. package/deploy/custom-elements/drawer/input/sign-up.js +1 -1
  26. package/deploy/custom-elements/icon/css/icon.d.ts.map +1 -1
  27. package/deploy/custom-elements/icon/css/icon.js +0 -1
  28. package/deploy/custom-elements/icon/icon.d.ts +1 -0
  29. package/deploy/custom-elements/icon/icon.d.ts.map +1 -1
  30. package/deploy/custom-elements/icon/icon.js +5 -1
  31. package/deploy/custom-elements/settings/css/navigation.d.ts.map +1 -1
  32. package/deploy/custom-elements/settings/input/delete.d.ts.map +1 -1
  33. package/deploy/custom-elements/settings/input/delete.js +1 -1
  34. package/deploy/custom-elements/settings/input/email.d.ts.map +1 -1
  35. package/deploy/custom-elements/settings/input/email.js +1 -1
  36. package/deploy/custom-elements/settings/input/images.d.ts.map +1 -1
  37. package/deploy/custom-elements/settings/input/images.js +1 -1
  38. package/deploy/custom-elements/settings/input/name.d.ts.map +1 -1
  39. package/deploy/custom-elements/settings/input/name.js +1 -1
  40. package/deploy/custom-elements/settings/input/password.d.ts.map +1 -1
  41. package/deploy/custom-elements/settings/input/password.js +1 -1
  42. package/deploy/custom-elements/settings/input/uploader.d.ts +1 -2
  43. package/deploy/custom-elements/settings/input/uploader.d.ts.map +1 -1
  44. package/deploy/custom-elements/settings/input/uploader.js +16 -23
  45. package/deploy/custom-elements/settings/settings.d.ts +1 -0
  46. package/deploy/custom-elements/settings/settings.d.ts.map +1 -1
  47. package/deploy/custom-elements/settings/settings.js +6 -2
  48. package/deploy/firebase/firebase-login.d.ts +21 -0
  49. package/deploy/firebase/firebase-login.d.ts.map +1 -0
  50. package/deploy/firebase/firebase-login.js +85 -0
  51. package/deploy/firebase/firebase.d.ts +20 -0
  52. package/deploy/firebase/firebase.d.ts.map +1 -0
  53. package/deploy/firebase/firebase.js +76 -0
  54. package/deploy/firebase/start.d.ts.map +1 -0
  55. package/deploy/{start.js → firebase/start.js} +11 -10
  56. package/deploy/lazy-loader.d.ts.map +1 -1
  57. package/deploy/redux/backend.d.ts.map +1 -1
  58. package/deploy/redux/drawer.d.ts.map +1 -1
  59. package/deploy/redux/frontend.d.ts.map +1 -1
  60. package/deploy/redux/frontend.js +1 -1
  61. package/deploy/redux/object.d.ts.map +1 -1
  62. package/deploy/store.d.ts.map +1 -1
  63. package/npm/images/empty.jpg +0 -0
  64. package/npm/pwa-auth.js +1 -1
  65. package/package.json +4 -3
  66. package/source/css/font.ts +17 -0
  67. package/source/css/form/button.ts +55 -0
  68. package/source/css/form/input.ts +25 -0
  69. package/source/css/form/label.ts +25 -0
  70. package/source/css/form/list.ts +23 -0
  71. package/source/css/svg.ts +5 -0
  72. package/source/css/toggle.ts +9 -0
  73. package/source/custom-elements/drawer/css/drawer.ts +64 -0
  74. package/source/custom-elements/drawer/css/exit.ts +49 -0
  75. package/source/custom-elements/drawer/css/link.ts +15 -0
  76. package/source/custom-elements/drawer/css/paragraph.ts +11 -0
  77. package/source/custom-elements/drawer/css/toggle.ts +19 -0
  78. package/source/custom-elements/drawer/drawer.ts +120 -0
  79. package/source/custom-elements/drawer/input/forgot.ts +121 -0
  80. package/source/custom-elements/drawer/input/login.ts +135 -0
  81. package/source/custom-elements/drawer/input/sign-up.ts +158 -0
  82. package/source/custom-elements/icon/css/icon.ts +70 -0
  83. package/source/custom-elements/icon/icon.ts +90 -0
  84. package/source/custom-elements/settings/css/navigation.ts +92 -0
  85. package/source/custom-elements/settings/input/delete.ts +83 -0
  86. package/source/custom-elements/settings/input/email.ts +135 -0
  87. package/source/custom-elements/settings/input/images.ts +57 -0
  88. package/source/custom-elements/settings/input/name.ts +99 -0
  89. package/source/custom-elements/settings/input/password.ts +156 -0
  90. package/source/custom-elements/settings/input/uploader.ts +329 -0
  91. package/source/custom-elements/settings/settings.ts +205 -0
  92. package/source/firebase/firebase-login.ts +246 -0
  93. package/source/firebase/firebase.ts +214 -0
  94. package/source/firebase/start.ts +216 -0
  95. package/source/lazy-loader.ts +20 -0
  96. package/source/redux/backend.ts +94 -0
  97. package/source/redux/drawer.ts +37 -0
  98. package/source/redux/frontend.ts +134 -0
  99. package/source/redux/object.ts +31 -0
  100. package/source/store.ts +19 -0
  101. package/website/404.html +33 -0
  102. package/website/THIRD_PARTY_LICENSES.txt +303 -0
  103. package/website/css/pwa-styles.css +36 -0
  104. package/website/css/styles.css +67 -0
  105. package/website/images/empty.jpg +0 -0
  106. package/website/images/favicon.ico +0 -0
  107. package/website/images/manifest/logo-144.png +0 -0
  108. package/website/images/manifest/logo-192.png +0 -0
  109. package/website/images/manifest/logo-48.png +0 -0
  110. package/website/images/manifest/logo-512.png +0 -0
  111. package/website/images/manifest/logo-72.png +0 -0
  112. package/website/images/manifest/logo-96.png +0 -0
  113. package/website/images/manifest/maskable_icon_x128.png +0 -0
  114. package/website/images/manifest/maskable_icon_x192.png +0 -0
  115. package/website/images/manifest/maskable_icon_x384.png +0 -0
  116. package/website/images/manifest/maskable_icon_x48.png +0 -0
  117. package/website/images/manifest/maskable_icon_x512.png +0 -0
  118. package/website/images/manifest/maskable_icon_x72.png +0 -0
  119. package/website/images/manifest/maskable_icon_x96.png +0 -0
  120. package/website/index.html +64 -0
  121. package/website/js/pwa-auth.js +306 -0
  122. package/website/sitemap.xml +11 -0
  123. package/deploy/interface.d.ts +0 -37
  124. package/deploy/interface.d.ts.map +0 -1
  125. package/deploy/interface.js +0 -176
  126. package/deploy/start.d.ts.map +0 -1
  127. /package/demo/{styles.css → css/styles.css} +0 -0
  128. /package/deploy/{start.d.ts → firebase/start.d.ts} +0 -0
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+
3
+ <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
4
+ <!--
5
+ <url>
6
+ <loc>https://www..com/</loc>
7
+ <lastmod>2025-09-06</lastmod>
8
+ <changefreq>monthly</changefreq>
9
+ </url>
10
+ -->
11
+ </urlset>
@@ -1,37 +0,0 @@
1
- interface base {
2
- applyActionCode: any;
3
- beforeAuthStateChanged: any;
4
- checkActionCode: any;
5
- confirmPasswordReset: any;
6
- connectAuthEmulator: any;
7
- createUserWithEmailAndPassword: any;
8
- fetchSignInMethodsForEmail: any;
9
- getMultiFactorResolver: any;
10
- getRedirectResult: any;
11
- initializeRecaptchaConfig: any;
12
- isSignInWithEmailLink: any;
13
- onAuthStateChanged: any;
14
- onIdTokenChanged: any;
15
- revokeAccessToken: any;
16
- sendPasswordResetEmail: any;
17
- sendSignInLinkToEmail: any;
18
- setPersistence: any;
19
- signInAnonymously: any;
20
- signInWithCredential: any;
21
- signInWithCustomToken: any;
22
- signInWithEmailAndPassword: any;
23
- signInWithEmailLink: any;
24
- signInWithPhoneNumber: any;
25
- signInWithPopup: any;
26
- signInWithRedirect: any;
27
- signOut: any;
28
- updateCurrentUser: any;
29
- useDeviceLanguage: any;
30
- validatePassword: any;
31
- verifyPasswordResetCode: any;
32
- handleRecoverEmail: any;
33
- sendEmailVerification: any;
34
- }
35
- export declare const authFunctions: base;
36
- export {};
37
- //# sourceMappingURL=interface.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../src/interface.ts"],"names":[],"mappings":"AAIA,UAAU,IAAI;IAEd,eAAe,EAAG,GAAG,CAAC;IACtB,sBAAsB,EAAG,GAAG,CAAC;IAC7B,eAAe,EAAG,GAAG,CAAC;IACtB,oBAAoB,EAAG,GAAG,CAAC;IAC3B,mBAAmB,EAAG,GAAG,CAAC;IAC1B,8BAA8B,EAAG,GAAG,CAAC;IACrC,0BAA0B,EAAG,GAAG,CAAC;IACjC,sBAAsB,EAAG,GAAG,CAAC;IAC7B,iBAAiB,EAAG,GAAG,CAAC;IACxB,yBAAyB,EAAG,GAAG,CAAC;IAChC,qBAAqB,EAAG,GAAG,CAAC;IAC5B,kBAAkB,EAAG,GAAG,CAAC;IACzB,gBAAgB,EAAG,GAAG,CAAC;IACvB,iBAAiB,EAAG,GAAG,CAAC;IACxB,sBAAsB,EAAG,GAAG,CAAC;IAC7B,qBAAqB,EAAG,GAAG,CAAC;IAC5B,cAAc,EAAG,GAAG,CAAC;IACrB,iBAAiB,EAAG,GAAG,CAAC;IACxB,oBAAoB,EAAG,GAAG,CAAC;IAC3B,qBAAqB,EAAG,GAAG,CAAC;IAC5B,0BAA0B,EAAG,GAAG,CAAC;IACjC,mBAAmB,EAAG,GAAG,CAAC;IAC1B,qBAAqB,EAAG,GAAG,CAAC;IAC5B,eAAe,EAAG,GAAG,CAAC;IACtB,kBAAkB,EAAG,GAAG,CAAC;IACzB,OAAO,EAAG,GAAG,CAAC;IACd,iBAAiB,EAAG,GAAG,CAAC;IACxB,iBAAiB,EAAG,GAAG,CAAC;IACxB,gBAAgB,EAAG,GAAG,CAAC;IACvB,uBAAuB,EAAG,GAAG,CAAC;IAC9B,kBAAkB,EAAC,GAAG,CAAC;IACvB,qBAAqB,EAAE,GAAG,CAAA;CACzB;AAqDD,eAAO,MAAM,aAAa,EAAG,IA6O1B,CAAA"}
@@ -1,176 +0,0 @@
1
- import { applyActionCode, beforeAuthStateChanged, checkActionCode, confirmPasswordReset, createUserWithEmailAndPassword, fetchSignInMethodsForEmail, getRedirectResult, isSignInWithEmailLink, onAuthStateChanged, onIdTokenChanged, sendPasswordResetEmail, setPersistence, signInAnonymously, signInWithCredential, signInWithCustomToken, signInWithEmailAndPassword, signInWithEmailLink, signInWithPhoneNumber, signInWithPopup, signInWithRedirect, signOut, updateCurrentUser, useDeviceLanguage, verifyPasswordResetCode } from "firebase/auth";
2
- import { auth } from "./start";
3
- export const authFunctions = {
4
- applyActionCode: {
5
- description: "Applies an out-of-band verification code (e.g., email verification).",
6
- example: (oobCode) => applyActionCode(auth, oobCode)
7
- .then(() => ({ success: true }))
8
- .catch((error) => ({ error: error.code, message: error.message }))
9
- },
10
- checkActionCode: {
11
- description: "Checks the metadata of an out-of-band verification code.",
12
- example: (code) => checkActionCode(auth, code)
13
- .then((info) => ({ info }))
14
- .catch((error) => ({ error: error.code, message: error.message }))
15
- },
16
- beforeAuthStateChanged: {
17
- description: 'Adds a blocking callback that runs before an auth state change sets a new user.',
18
- code: (callback, onAbort) => beforeAuthStateChanged(auth, callback, onAbort)
19
- },
20
- confirmPasswordReset: {
21
- description: "Completes the password reset process with a code and new password.",
22
- example: (code, newPassword) => confirmPasswordReset(auth, code, newPassword)
23
- .then(() => ({ success: true }))
24
- .catch((error) => ({ error: error.code, message: error.message }))
25
- },
26
- connectAuthEmulator: {},
27
- createUserWithEmailAndPassword: {
28
- description: "Creates a new user account with email and password, and signs them in.",
29
- example: (email, password) => createUserWithEmailAndPassword(auth, email, password)
30
- .then((userCredential) => ({ user: userCredential.user }))
31
- .catch((error) => ({ error: error.code, message: error.message }))
32
- },
33
- fetchSignInMethodsForEmail: {
34
- description: "Gets the list of sign-in methods for a given email.",
35
- example: (email) => fetchSignInMethodsForEmail(auth, email)
36
- .then((methods) => ({ methods }))
37
- .catch((error) => ({ error: error.code, message: error.message }))
38
- },
39
- getMultiFactorResolver: {},
40
- getRedirectResult: {
41
- description: "Retrieves the result of a redirect-based sign-in flow.",
42
- example: () => getRedirectResult(auth)
43
- .then((result) => ({ user: result.user }))
44
- .catch((error) => ({ error: error.code, message: error.message }))
45
- },
46
- initializeRecaptchaConfig: {},
47
- isSignInWithEmailLink: {
48
- description: "Checks if a link is a valid sign-in with email link.",
49
- example: (link) => isSignInWithEmailLink(auth, link)
50
- },
51
- onAuthStateChanged: {
52
- description: "Listens for changes in the authentication state.",
53
- example: (callback) => onAuthStateChanged(auth, callback)
54
- },
55
- signOut: {
56
- description: "Signs out the current user.",
57
- example: () => signOut(auth)
58
- .then(() => ({ success: true }))
59
- .catch(error => ({ error: error.code, message: error.message }))
60
- },
61
- onIdTokenChanged: {
62
- description: "Listens for changes in the ID token.",
63
- example: (callback) => onIdTokenChanged(auth, callback)
64
- },
65
- handleRecoverEmail(actionCode, lang) {
66
- let restoredEmail = null;
67
- checkActionCode(auth, actionCode).then((info) => {
68
- restoredEmail = info['data']['email'];
69
- return applyActionCode(auth, actionCode);
70
- }).then(() => {
71
- sendPasswordResetEmail(auth, restoredEmail).then(() => {
72
- }).catch((error) => {
73
- });
74
- }).catch((error) => {
75
- });
76
- },
77
- signInWithEmailAndPassword: {
78
- description: "Signs in a user with email and password.",
79
- example: (email, password) => signInWithEmailAndPassword(auth, email, password)
80
- .then(userCredential => ({ user: userCredential.user }))
81
- .catch(error => ({ error: error.code, message: error.message }))
82
- },
83
- signInWithPopup: {
84
- description: "Signs in a user via a popup with a federated provider (e.g., Google, Facebook).",
85
- example: (provider) => signInWithPopup(auth, provider)
86
- .then(result => ({ user: result.user }))
87
- .catch(error => ({ error: error.code, message: error.message }))
88
- },
89
- signInWithRedirect: {
90
- description: "Signs in a user via redirect with a federated provider.",
91
- example: (provider) => signInWithRedirect(auth, provider)
92
- .catch(error => ({ error: error.code, message: error.message }))
93
- },
94
- signInAnonymously: {
95
- description: "Signs in a user anonymously without credentials.",
96
- example: () => signInAnonymously(auth)
97
- .then(userCredential => ({ user: userCredential.user }))
98
- .catch(error => ({ error: error.code, message: error.message }))
99
- },
100
- signInWithCustomToken: {
101
- description: "Signs in a user with a custom token from an external auth system.",
102
- example: (token) => signInWithCustomToken(auth, token)
103
- .then(userCredential => ({ user: userCredential.user }))
104
- .catch(error => ({ error: error.code, message: error.message }))
105
- },
106
- signInWithEmailLink: {
107
- description: "Signs in a user with an email link.",
108
- example: (email, link) => signInWithEmailLink(auth, email, link)
109
- .then(userCredential => ({ user: userCredential.user }))
110
- .catch(error => ({ error: error.code, message: error.message }))
111
- },
112
- signInWithPhoneNumber: {
113
- description: "Signs in a user with a phone number and verification code.",
114
- example: (phoneNumber, appVerifier) => signInWithPhoneNumber(auth, phoneNumber, appVerifier)
115
- .then(confirmationResult => ({ confirmationResult }))
116
- .catch(error => ({ error: error.code, message: error.message }))
117
- },
118
- signInWithCredential: {
119
- description: "Signs in a user with a credential object (e.g., from OAuth).",
120
- example: (credential) => signInWithCredential(auth, credential)
121
- .then(userCredential => ({ user: userCredential.user }))
122
- .catch(error => ({ error: error.code, message: error.message }))
123
- },
124
- updateCurrentUser: {
125
- description: "Updates the current user with a new User object.",
126
- example: (user) => updateCurrentUser(auth, user)
127
- .then(() => ({ success: true }))
128
- .catch(error => ({ error: error.code, message: error.message }))
129
- },
130
- sendPasswordResetEmail: {
131
- description: "Sends a password reset email to the user.",
132
- example: (email) => sendPasswordResetEmail(auth, email)
133
- .then(() => ({ success: true }))
134
- .catch(error => ({ error: error.code, message: error.message }))
135
- },
136
- verifyPasswordResetCode: {
137
- description: "Verifies a password reset code sent to the user.",
138
- example: (code) => verifyPasswordResetCode(auth, code)
139
- .then(email => ({ email }))
140
- .catch(error => ({ error: error.code, message: error.message }))
141
- },
142
- sendEmailVerification: {
143
- description: "Sends an email verification to the current user.",
144
- example: (user) => user.sendEmailVerification()
145
- .then(() => ({ success: true }))
146
- .catch(error => ({ error: error.code, message: error.message }))
147
- },
148
- setPersistence: {
149
- description: "Sets the persistence mechanism for auth state.",
150
- example: (persistence) => setPersistence(auth, persistence)
151
- .then(() => ({ success: true }))
152
- .catch(error => ({ error: error.code, message: error.message }))
153
- },
154
- useDeviceLanguage: {
155
- description: "Sets the auth instance language to the device's language.",
156
- example: () => useDeviceLanguage(auth)
157
- },
158
- self, : .onmessage = (event) => {
159
- const { action, data } = event.data;
160
- if (action === 'executeAuthFunction' && authFunctions[data.functionName]) {
161
- authFunctions[data.functionName].example(...(data.args || []))
162
- .then(result => self.postMessage({ status: 'success', result }))
163
- .catch(error => self.postMessage({ status: 'error', error }));
164
- }
165
- else {
166
- self.postMessage({ status: 'error', error: 'Invalid function or request' });
167
- }
168
- },
169
- self, : .postMessage({
170
- status: 'init',
171
- authFunctions: Object.keys(authFunctions).map(key => ({
172
- name: key,
173
- description: authFunctions[key].description
174
- }))
175
- })
176
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../src/start.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,WAAW,EAAiB,MAAM,cAAc,CAAC;AAG1D,OAAO,EAAE,IAAI,EAAE,IAAI,EAA+D,MAAM,eAAe,CAAC;AAGxG,OAAO,EAAgB,SAAS,EAAkB,MAAM,oBAAoB,CAAC;AAG7E,OAAO,EAAc,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAiBhE,eAAO,MAAM,WAAW,EAAM,WAA0C,CAAC;AACzE,eAAO,MAAM,EAAE,EAAe,SAA6C,CAAC;AAC5E,eAAO,MAAM,OAAO,EAAU,eAA2C,CAAC;AAC1E,eAAO,MAAM,IAAI,EAAa,IAAwC,CAAC;AACvE,eAAO,MAAM,IAAI,EAAa,IAAI,GAAG,IAA6B,CAAC;AA+HnE,eAAO,MAAM,MAAM,qBAAoD,CAAC;AACxE,eAAO,MAAM,UAAU,qBAAiE,CAAC;AACzF,eAAO,MAAM,gBAAgB,qBAA2D,CAAC;AACzF,eAAO,MAAM,cAAc,GAAc,SAAQ,MAAM,EAAE,MAAK,MAAM,kBAInE,CAAC"}
File without changes
File without changes