pwa-auth 3.5.1 → 3.7.0

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 (112) hide show
  1. package/README.md +139 -491
  2. package/base/export/drawer.d.ts +2 -0
  3. package/base/export/drawer.d.ts.map +1 -0
  4. package/base/export/drawer.js +2 -0
  5. package/base/export/drawer.js.map +1 -0
  6. package/base/export/icon.d.ts +2 -0
  7. package/base/export/icon.d.ts.map +1 -0
  8. package/base/export/icon.js +2 -0
  9. package/base/export/icon.js.map +1 -0
  10. package/base/export/login.d.ts +2 -0
  11. package/base/export/login.d.ts.map +1 -0
  12. package/base/export/login.js +2 -0
  13. package/base/export/login.js.map +1 -0
  14. package/base/export/reset.d.ts +2 -0
  15. package/base/export/reset.d.ts.map +1 -0
  16. package/base/export/reset.js +2 -0
  17. package/base/export/reset.js.map +1 -0
  18. package/base/export/settings.d.ts +2 -0
  19. package/base/export/settings.d.ts.map +1 -0
  20. package/base/export/settings.js +2 -0
  21. package/base/export/settings.js.map +1 -0
  22. package/base/firebase/google.d.ts +9 -0
  23. package/base/firebase/google.d.ts.map +1 -0
  24. package/base/firebase/google.js +56 -0
  25. package/base/firebase/google.js.map +1 -0
  26. package/base/firebase/interface.d.ts.map +1 -1
  27. package/base/firebase/interface.js +2 -0
  28. package/base/firebase/interface.js.map +1 -1
  29. package/base/firebase/message.d.ts.map +1 -1
  30. package/base/firebase/message.js +1 -0
  31. package/base/firebase/message.js.map +1 -1
  32. package/base/webcomponents/css/animation.d.ts +2 -0
  33. package/base/webcomponents/css/animation.d.ts.map +1 -1
  34. package/base/webcomponents/css/animation.js +49 -11
  35. package/base/webcomponents/css/animation.js.map +1 -1
  36. package/base/webcomponents/drawer/css/drawer.d.ts.map +1 -1
  37. package/base/webcomponents/drawer/css/drawer.js +11 -55
  38. package/base/webcomponents/drawer/css/drawer.js.map +1 -1
  39. package/base/webcomponents/drawer/css/exit.js +1 -1
  40. package/base/webcomponents/drawer/css/paragraph.d.ts.map +1 -1
  41. package/base/webcomponents/drawer/css/paragraph.js +10 -3
  42. package/base/webcomponents/drawer/css/paragraph.js.map +1 -1
  43. package/base/webcomponents/drawer/drawer.d.ts +25 -0
  44. package/base/webcomponents/drawer/drawer.d.ts.map +1 -1
  45. package/base/webcomponents/drawer/drawer.js +276 -20
  46. package/base/webcomponents/drawer/drawer.js.map +1 -1
  47. package/base/webcomponents/form/css/button.d.ts.map +1 -1
  48. package/base/webcomponents/form/css/button.js +53 -15
  49. package/base/webcomponents/form/css/button.js.map +1 -1
  50. package/base/webcomponents/form/css/input.d.ts.map +1 -1
  51. package/base/webcomponents/form/css/input.js +10 -1
  52. package/base/webcomponents/form/css/input.js.map +1 -1
  53. package/base/webcomponents/form/css/label.d.ts.map +1 -1
  54. package/base/webcomponents/form/css/label.js +19 -1
  55. package/base/webcomponents/form/css/label.js.map +1 -1
  56. package/base/webcomponents/form/css/list.d.ts.map +1 -1
  57. package/base/webcomponents/form/css/list.js +2 -1
  58. package/base/webcomponents/form/css/list.js.map +1 -1
  59. package/base/webcomponents/form/css/notice.js +3 -3
  60. package/base/webcomponents/form/css/status.d.ts.map +1 -1
  61. package/base/webcomponents/form/css/status.js +18 -5
  62. package/base/webcomponents/form/css/status.js.map +1 -1
  63. package/base/webcomponents/form/css/toggle.d.ts.map +1 -1
  64. package/base/webcomponents/form/css/toggle.js +7 -0
  65. package/base/webcomponents/form/css/toggle.js.map +1 -1
  66. package/base/webcomponents/form/forgot.d.ts.map +1 -1
  67. package/base/webcomponents/form/forgot.js +5 -4
  68. package/base/webcomponents/form/forgot.js.map +1 -1
  69. package/base/webcomponents/form/google-button.d.ts +3 -0
  70. package/base/webcomponents/form/google-button.d.ts.map +1 -0
  71. package/base/webcomponents/form/google-button.js +23 -0
  72. package/base/webcomponents/form/google-button.js.map +1 -0
  73. package/base/webcomponents/form/login.d.ts +5 -0
  74. package/base/webcomponents/form/login.d.ts.map +1 -1
  75. package/base/webcomponents/form/login.js +41 -1
  76. package/base/webcomponents/form/login.js.map +1 -1
  77. package/base/webcomponents/form/signup.d.ts +5 -0
  78. package/base/webcomponents/form/signup.d.ts.map +1 -1
  79. package/base/webcomponents/form/signup.js +41 -1
  80. package/base/webcomponents/form/signup.js.map +1 -1
  81. package/base/webcomponents/icon/css/icon.d.ts.map +1 -1
  82. package/base/webcomponents/icon/css/icon.js +9 -0
  83. package/base/webcomponents/icon/css/icon.js.map +1 -1
  84. package/base/webcomponents/login/css/auth.d.ts +2 -2
  85. package/base/webcomponents/login/css/auth.d.ts.map +1 -1
  86. package/base/webcomponents/login/css/auth.js +12 -13
  87. package/base/webcomponents/login/css/auth.js.map +1 -1
  88. package/base/webcomponents/login/page.d.ts +21 -1
  89. package/base/webcomponents/login/page.d.ts.map +1 -1
  90. package/base/webcomponents/login/page.js +191 -8
  91. package/base/webcomponents/login/page.js.map +1 -1
  92. package/base/webcomponents/settings/css/navigation.js +3 -3
  93. package/base/webcomponents/settings/input/delete.d.ts.map +1 -1
  94. package/base/webcomponents/settings/input/delete.js +7 -1
  95. package/base/webcomponents/settings/input/delete.js.map +1 -1
  96. package/base/webcomponents/settings/input/uploader.d.ts.map +1 -1
  97. package/base/webcomponents/settings/input/uploader.js +8 -4
  98. package/base/webcomponents/settings/input/uploader.js.map +1 -1
  99. package/base/webcomponents/settings/input/verify.d.ts.map +1 -1
  100. package/base/webcomponents/settings/input/verify.js +24 -7
  101. package/base/webcomponents/settings/input/verify.js.map +1 -1
  102. package/base/webcomponents/settings/settings.d.ts +19 -1
  103. package/base/webcomponents/settings/settings.d.ts.map +1 -1
  104. package/base/webcomponents/settings/settings.js +177 -12
  105. package/base/webcomponents/settings/settings.js.map +1 -1
  106. package/docs/drawer-slide.md +206 -0
  107. package/docs/sliders.md +73 -0
  108. package/package.json +49 -10
  109. package/source/pwa-auth.js +510 -297
  110. package/source/pwa-styles.css +0 -7
  111. package/firebase.md +0 -107
  112. package/intro.md +0 -19
@@ -23,19 +23,15 @@
23
23
  --pwa_drawer_z-index: 3;
24
24
  --pwa_drawer_border-radius: 0 0 18px 18px;
25
25
  --pwa_drawer_text_color: #1c2430;
26
- --pwa_drawer_background_color: #fffdf8;
27
26
 
28
27
  /* <user-settings> */
29
- --pwa_settings_background_color: #fffdf8;
30
28
  --pwa_divider_color: #e3daca;
31
29
  --pwa_nav_button_color: #4e5b6a;
32
30
  --pwa_nav_highlight_color: #1c2430;
33
- --pwa_nav_on_background: #f3efe6;
34
31
  --pwa_header_color: #1c2430;
35
32
 
36
33
  /* fields */
37
34
  --pwa_label_text_color: #1c2430;
38
- --pwa_input_background_color: #f3efe6;
39
35
  --pwa_line_color: #e3daca;
40
36
 
41
37
  /* buttons */
@@ -44,7 +40,4 @@
44
40
  --pwa_action_border_color: #214f34;
45
41
  --pwa_close_color: #9a3b32;
46
42
 
47
- /* <user-login> */
48
- --section_background_color: #fffdf8;
49
-
50
43
  }
package/firebase.md DELETED
@@ -1,107 +0,0 @@
1
- # Firebase
2
-
3
- ## Project
4
-
5
- - Firebase Authentication with email and password
6
- - Cloud Storage bucket
7
- - Google Analytics, if you call `logAccount` or `logAccountDelete`
8
-
9
- ## Storage rules
10
-
11
- Storage rules must allow the signed-in user to read and write only `pwa-auth/{uid}/**`.
12
-
13
- ## Firestore rules
14
-
15
- Firestore rules allow `users/{uid}` and `contractors/{uid}`, and any other document `deleteDocument` removes, only when the signed-in uid is the document id or the `owner` field. Everything else is denied. The host owns those documents. See [Data ownership](README.md#data-ownership).
16
-
17
- ## FIREBASE_CONFIG
18
-
19
- Required. Call `initialize({ config })`, or set `window.process.env.FIREBASE_CONFIG` in a classic script before the module runs. One assignment. A second `window.process = …` replaces the first and drops keys you already set.
20
-
21
- ```html
22
- <script>
23
- window.process = { env: { FIREBASE_CONFIG: JSON.stringify({
24
- apiKey: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
25
- authDomain: "xxxxxxx.xxxxxxx.xxx",
26
- databaseURL: "https://xxxxxxx.xxxxxxx.xxx",
27
- projectId: "xxxxxxx",
28
- storageBucket: "xxxxxxx.xxxxxxx.xxx",
29
- messagingSenderId: "xxxxxxxxxxx",
30
- appId: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
31
- measurementId: "xxxxxxxxxxx"
32
- }) } };
33
- </script>
34
- ```
35
-
36
- `authentication.ts` reads `process.env.FIREBASE_CONFIG` when `apiKey` is present and calls `initialize`. An empty config does not throw. Call `initialize` instead.
37
-
38
- ## initialize
39
-
40
- ```javascript
41
- import { initialize } from 'pwa-auth';
42
- import { getApp } from 'firebase/app';
43
-
44
- // Optional - your config
45
- initialize({
46
- config: {
47
- apiKey: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
48
- authDomain: "xxxxxxx.xxxxxxx.xxx",
49
- projectId: "xxxxxxx",
50
- storageBucket: "xxxxxxx.xxxxxxx.xxx",
51
- messagingSenderId: "xxxxxxxxxxx",
52
- appId: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
53
- }
54
- });
55
-
56
- // Optional - an app you already created. Omit FIREBASE_CONFIG when you do this.
57
- initialize({ app: getApp() });
58
- ```
59
-
60
- | Export | |
61
- |---|---|
62
- | `initialize({ app, config, actionCodeSettings })` | Boot Firebase. `app` is a host app. `config` is a host config. `actionCodeSettings` is optional and is passed to the verification email. The legacy `FIREBASE_CONFIG` script still works. |
63
-
64
- ## firebase-config attribute
65
-
66
- Optional. A tag can carry the same JSON. The first element to connect wins, and only when the app is not up yet.
67
-
68
- ```html
69
- <user-icon firebase-config='{"apiKey":"...","authDomain":"...","projectId":"..."}'></user-icon>
70
- ```
71
-
72
- The first `initialize` wins. A later call with a different app throws.
73
-
74
- ## actionCodeSettings
75
-
76
- Optional. `actionCodeSettings` is passed to `sendEmailVerification`. Put the continue URL in `url`. A later `initialize({ actionCodeSettings })` still stores it after the app is up.
77
-
78
- ```javascript
79
- initialize({
80
- config,
81
- actionCodeSettings: { url: 'https://example.com/continue' }
82
- });
83
- ```
84
-
85
- ## Auth, Firestore, and Storage
86
-
87
- | Export | |
88
- |---|---|
89
- | `auth` | Firebase Auth for this app. Read `auth.currentUser` at call time. |
90
- | `db` | Firestore. |
91
- | `storage` | Cloud Storage. |
92
- | `application` | The Firebase app from `initialize` or from `FIREBASE_CONFIG`. |
93
- | `firebaseConfig` | The parsed config object. |
94
-
95
- ## Password
96
-
97
- Firebase Auth's own minimum is 6 characters. Sign-up and a password change in `<user-settings>` ask for 8 to 128. Spaces and other characters are allowed. There is no requirement for a number or a symbol. The sentence under the field is "At least 8 characters. A passphrase works well." A short password reads "Use at least 8 characters."
98
-
99
- In the Firebase console, open Authentication and turn on the password policy. Set the minimum to 8 so the server uses the same rule. This package does not change that policy.
100
-
101
- ## Emulators
102
-
103
- ```bash
104
- npm run test:emulator # Auth, Firestore, and Storage emulators, then the browser checks
105
- ```
106
-
107
- `npm run test:emulator` uses `firebase-tools` 14.24.0. Firestore and Storage need Java 21 or newer on `PATH`.
package/intro.md DELETED
@@ -1,19 +0,0 @@
1
- # A short introduction
2
-
3
- ## What it is
4
-
5
- pwa-auth is the sign-in for your website. It stays on your site, in your own look. People use an email address and a password. There is one sign-in for the whole page.
6
-
7
- ## What it does for you
8
-
9
- Your visitors see a button. Before they sign in it says Login, or Subscribe if you prefer that word. After they sign in it shows their photo.
10
-
11
- A panel drops down from the top. They can create an account or sign in. Once they are in, they see their name, a link to their settings, and a way to log out.
12
-
13
- In settings they can change their photo, name, email, and password, or delete the account. Creating an account sends a verification email. They can still sign in before they open that email.
14
-
15
- They look after that sign-in themselves. Your site keeps the records it creates. This sign-in does not write those records, and deleting an account does not remove them. The files stored for that sign-in are removed with the account.
16
-
17
- ## How to get started
18
-
19
- The person who adds this to your site follows the [Quick start](README.md#quick-start). There is also a [live demo](https://pwa-authentic.firebaseapp.com).