pwa-auth 0.0.16 → 1.1.4

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/CHANGELOG.md CHANGED
@@ -5,11 +5,37 @@ All notable changes to this project will be documented in this file.
5
5
 
6
6
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/).
7
7
 
8
+ Added - for new features.
9
+ Changed - for changes in existing functionality.
10
+ Deprecated - for soon-to-be removed features.
11
+ Removed - for now removed features.
12
+ Fixed - for any bug fixes.
13
+ Security - in case of vulnerabilities.
14
+
15
+ # [1.0.8] - 2025-08-23
16
+
17
+ ## Changed
18
+ - Read me file: updated information
19
+ - CSS Custom Variables: update color schemes
20
+ - Redux: check and update all connections
21
+ - Input: Password: update correctness
22
+
23
+ ## Add
24
+ - Element Internals Standard
25
+ - Forgot Password Reset
26
+
27
+ ## REMOVED
28
+ - Telephone Verification for version 1 simplicity
29
+
30
+
31
+
32
+
33
+
8
34
  ## [Unreleased]
9
35
  - Facebook Login
10
36
  - Phone Login
11
37
  - Play Games Login
12
- - Twitter Login
38
+ - X Login
13
39
  - Github Login
14
40
  - display nested content after webcomponent loads
15
41
  - create password after social Login
@@ -18,15 +44,61 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
18
44
  - update user info upon change submission
19
45
  - change user-icon to "Login" text
20
46
 
21
- ## [0.1.0] - 2019-03-26
47
+ ## [1.0.0] - 2025-08-04
48
+
49
+ ## To Do
50
+ - Image Upload Minify
51
+ - Image Upload Save Mini-url
52
+
53
+ ## Changed
54
+ - Redux/Toolkit Upgrade
55
+ - Lit Upgrade
56
+ - Demo Index Update
57
+ - Firebase Functions
58
+ - Custom Elements into Personal Folders
59
+ - Profile Section: Too many input, downsize
60
+ - Email Section to Verification Section
61
+ - Password Section to Security Section
62
+ - Remove id's, Replace with class
63
+ - CSS Custom Properties
64
+ - Drawer Input Design
65
+ - Firebase CDN or SDK
66
+ - firebase messaging service worker CDN
67
+ - Check Analytics Integration
68
+ - Input JavaScript Configuration - global let anywhere, or within slot
69
+ - Input CSS Custom Properties - global :root anywhere, or within slot
70
+ - Custom CSS Properties - namespase for each component
71
+ - Merge Duplicate Redux Files
72
+ - Visual Effects, CSS Active Content
73
+ - Folder Namespace as technology stack
74
+ - Redux Frontend / Backend State
22
75
 
23
76
  ### Added
24
- - Upgraded to Typescript
25
- - alert user to login when submitting form
77
+ - Firebase Element for Firebase SDK
78
+ - Google Firebase Analytics to Initialization
79
+ - Firebase Web App to Initialization
80
+ - Step Process #1 - Initialize Firebase Object
81
+ - Space Saving Freature: Menu Bar: Icon > Active > Text\
82
+ - Firebase TypeScript Object - Analytics
83
+ - Firebase TypeScript Object - Functions
84
+ - Analytics Bootup Logic Check, Fallback, Local, Offline
85
+ - Google Tag Manager Conversion - Integrateion
86
+ - Content-Photo-Element Uploader
87
+ - custom elements - input subdivision
88
+ - Firestore Database Structure
89
+ - Verify Email moved to custom event listener within firebase function onstate change
90
+ - Theme Color Detection
91
+ - CORS
92
+
93
+ ### Removed
94
+ - Remove Storybook
95
+ - Remove Firebase Cloud Messaging (FCM) Integration
26
96
 
27
97
  ## [0.0.14] - 2019-03-24
28
98
 
29
99
  ### Added
100
+ - Upgraded to Typescript
101
+ - alert user to login when submitting form
30
102
  - Verify user before submitting form
31
103
  - Forms prevent default
32
104
 
package/README.md CHANGED
@@ -1,85 +1,134 @@
1
- Application Authentication
2
- ======================
3
- ![workflow](https://www.inmostfire.com/images/workflow.png) [Demo](https://www.inmostfire.com)
4
-
5
- To provide a personalized experience, Apps need to know the identity of a user to securely store data in the cloud. pwa-auth is powered by The Firebase Authentication backend, consistently providing a centralized and predictable state behaviour with Redux, and declaratively render the DOM with Google Polymer's fast and light Lit-Element. This Component includes 3 HTML Tags, and 1 Boilerplate Function to display the user icon, sign up, login, log out, change account details, and delete the user's account.
6
-
7
- ![Subscribe](https://www.inmostfire.com/images/settings.png)
8
-
9
- PWA-AUTH includes Firebase's Cloud Firestore, Cloud Storage, and User Management that require Firebase setup to use this component.
10
-
11
- | `<user-icon>` | `<user-drawer>` | `<user-settings>` |
12
- | :-----------: | :-------------: | :---------------: |
13
- | 1 photo | Drop-down | Profile |
14
- | fetch social login photo | One click Google Login | Email |
15
- | Upload / Change Profile Photo | Email Addresses and Passwords | Password |
16
- | logged in Photo | Email Login |
17
- | logged out Photo |
18
- | unavailable Photo |
19
-
20
- ## Pollyfills
21
- ```html
22
- <script src="./node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js" async ></script>
23
- ```
24
- ## Google & Firebase setup
25
- * Add Google Analytics
26
- * Setup Firebase Project
27
- * Initialize Firebase Authentication - email, anonymous, google
28
- * Initialize Firestore Database
29
- ```html
30
- <!-- FIREBASE -->
31
- <script src="https://www.gstatic.com/firebasejs/5.9.0/firebase-app.js"></script>
32
- <script src="https://www.gstatic.com/firebasejs/5.9.0/firebase-auth.js"></script>
33
- <script src="https://www.gstatic.com/firebasejs/5.9.0/firebase-firestore.js"></script>
34
- <script src="https://www.gstatic.com/firebasejs/5.9.0/firebase-storage.js"></script>
35
- ```
36
- ```javascript
37
- // Initialize Firebase
38
- const admin = {
39
- apiKey: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
40
- authDomain: "xxxxxxx.firebaseapp.com",
41
- databaseURL: "https://xxxxxxx.firebaseio.com",
42
- projectId: "xxxxxxx",
43
- storageBucket: "xxxxxxx.appspot.com",
44
- messagingSenderId: "xxxxxxxxxxx"
45
- };
46
- // REFERENCE TO SERVICES - Global
47
- const application = firebase.initializeApp(admin);
48
- const firestore = application.firestore();
49
- const storage = firebase.storage();
50
- const storageRef = storage.ref();
51
- ```
52
-
53
- ## Website Setup:
54
- ```javascript
55
- import 'pwa-auth';
56
- import { runFirebase } from 'pwa-auth/src/user-functions';
57
- constructor() { runFirebase(); }
58
- ```
59
- ```html
60
- <header>
61
- <user-icon></user-icon>
62
- </header>
63
-
64
- <user-drawer></user-drawer>
65
-
66
- <main>
67
- <user-settings></user-settings>
68
- </main>
69
- ```
70
-
71
- ## Properties (in Development)
72
- | Property | Description | Default |
73
- | :------: | :---------: | :------:|
74
- | --drawer-position: | Static or Still during scrolling fixed / absolute | fixed |
75
- | --drawer-background-color: | change background | #fff |
76
- | --drawer-border: | border thinckness | 3px |
77
-
78
- ## Command Line Interface Tools
79
- * polymer-cli
80
- * firebase-tools
81
-
82
- ## Please send Feedback
83
- All feedback, comments, bugs, and requests are welcome.
84
- * [Jack's Publishing](https://www.jackspublishing.com)
1
+ Progressive Website Application Authentication
2
+ ======================
3
+
4
+ # The library [Demo](https://pwa-authentic.firebaseapp.com)
5
+
6
+ - Simplicty: copy js bundle: node_modules/pwa-auth/npm/pwa-auth.js
7
+
8
+ 3 HTML Custom Elements with Firebase Authentication:
9
+ - user-icon
10
+ - user-drawer
11
+ - user-settings
12
+
13
+ This library provides Identity Access Managementy to securely store user's data.
14
+
15
+ ## Technological Stack
16
+ - Development Environment: [Node JavaScript](https://nodejs.org)
17
+ - Backend: Google Cloud: [Firebase](https://firebase.google.com/)
18
+ - Predicate State Behavior: [Redux](https://redux.js.org/)
19
+ - Frontend: [Lit](https://lit.dev)
20
+
21
+ ## Boilerplate
22
+ - 3 Tag Placements (Custom HTML Elements)
23
+ - Cascading Style Sheets (CSS)
24
+ - ECMA Script (JavaScript)
25
+
26
+ ## Features:
27
+ - Register through Email and Password
28
+ - Log-in
29
+ - Log-out
30
+ - Change Username
31
+ - Change Profile Picture
32
+ - Change Email
33
+ - Change Password
34
+ - Delete Account
35
+
36
+ ## Custom Elements
37
+
38
+ ### `<user-icon>`
39
+ - Login Word Button - State
40
+ - 1 Photo Icon Display - State
41
+
42
+ ### `<user-drawer>`
43
+ - Drop-down
44
+ - Sign-up by Email Addresses and Password
45
+ - Sign-in by Email Addresses and Password
46
+ - logged-in state
47
+ - logged-out state
48
+
49
+ ### `<user-settings>`
50
+ - 1 Photo Upload
51
+ - Unavailable Photo
52
+ - Delete Account
53
+
54
+ # Website Setup:
55
+ ```html
56
+ <header>
57
+ <user-icon></user-icon>
58
+ </header>
59
+
60
+ <user-drawer></user-drawer>
61
+
62
+ <main>
63
+ <user-settings></user-settings>
64
+ </main>
65
+
66
+ <script>/* Initialize ECMA Script Properties */</script>
67
+ <style>/* CSS Custom Properties */</style>
68
+ <script src="pwa-auth.js"></script>
69
+ ```
70
+
71
+ ## Google Setup
72
+ - Google Analytics
73
+ - Firebase Project
74
+
75
+ ## Firebase Setup
76
+ - Authentication - email
77
+ - Cloud Firestore - database
78
+ - Cloud Storage
79
+
80
+ ```javascript
81
+ // Initialize Firebase
82
+ let connect = {
83
+ apiKey: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
84
+ authDomain: "xxxxxxx.xxxxxxx.xxx",
85
+ databaseURL: "https://xxxxxxx.xxxxxxx.xxx",
86
+ projectId: "xxxxxxx",
87
+ storageBucket: "xxxxxxx.xxxxxxx.xxx",
88
+ messagingSenderId: "xxxxxxxxxxx",
89
+ appId: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
90
+ measurementId: "xxxxxxxxxxx"
91
+ };
92
+
93
+ if (lolalhost) { connect = { /* etc. */ } }
94
+ ```
95
+
96
+ ## CSS Default Custom Properties
97
+ | CSS Custom Property | Description | Default | Custom Element |
98
+ | :--- | ---: | :---: | :--- |
99
+ | --pwa_nav_button | Navigation | grey; | Settings |
100
+ | --pwa_nav_select | Navigation | black; | Settings |
101
+ | --pwa_input_background | Input | #E1E5EB; | Settings |
102
+ | --pwa_label_text_color | Input | black; | Settings |
103
+ | --pwa_section_header | Header | black; | Settings |
104
+ | --pwa_divider | Divider | grey; | Settings |
105
+ | --pwa_action_text_color | Button | #fff; | Settings |
106
+ | --pwa_action_background_color | Button | #6cc04a; | Settings |
107
+ | --pwa_action_border_color | Button | #60b23e; | Settings |
108
+ | --pwa_drawer_text_color | Input | #303030; | Drawer |
109
+ | --pwa_drawer_background_color | Input | #fff; | Drawer |
110
+ | --pwa_icon_background | Input | #6cc04a; | Icon |
111
+ | --pwa_icon_hover | Input | lightgrey | Icon |
112
+
113
+ ```html
114
+ <!-- CSS: Custom Variables: <head> tag -->
115
+ <style>
116
+
117
+ :root {
118
+ --pwa_divider: grey;
119
+ /* etc. */
120
+ }
121
+
122
+ /* Dark Theme */
123
+ @media (prefers-color-scheme: dark) { /* etc. */ }
124
+
125
+ /* Light Theme */
126
+ @media (prefers-color-scheme: light) { /* etc. */ }
127
+
128
+ </style>
129
+ ```
130
+
131
+ # Feedback
132
+ All feedback, comments, bugs, and requests are welcome.
133
+ * [Jack's Publishing](https://www.jackspublishing.com)
85
134
  * [contractor's centre](https://www.contractorscentre.com)
@@ -0,0 +1,118 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+
5
+ <meta charset="UTF-8">
6
+ <!-- BASE -->
7
+ <base href="/">
8
+ <!-- TITILE -->
9
+ <title>pwa-auth</title>
10
+ <!-- VIEWPORT -->
11
+ <meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1" />
12
+ <!-- THEME COLOR -->
13
+ <meta name="theme-color" content="#272931" />
14
+ <!-- AUTHOR -->
15
+ <meta name="author" content="Jacek Markiewicz" />
16
+ <!-- DESCRIPTION -->
17
+ <meta name="description" content="To provide a personalized experience, Apps need to know the identity of a user to securely store data in the cloud. pwa-auth is powered by The Firebase Authentication backend, consistently providing a centralized and predictable state behaviour with Redux, and declaratively rendering straight into the DOM with Google Polymer's fast and light Lit-Element. This Component includes 3 HTML Tags, and 1 Boilerplate Function to display the user icon, sign up, login, log out, change account details, and delete the user's account." />
18
+ <!-- KEYWORDS -->
19
+ <meta name="keywords" content="lit, redux, firebase, authentication, drawer, settings, icon, username, email, password, delete" />
20
+ <!-- HTTPS REFERRER TAG-->
21
+ <meta name="referrer" content="origin" />
22
+ <!-- MANIFEST -->
23
+ <link rel="manifest" href="manifest.json" />
24
+ <!-- FAVICON -->
25
+ <link rel="icon" href="images/favicon.ico">
26
+
27
+ <!-- Preconnect -->
28
+ <link rel="preconnect" href="https://firebasestorage.googleapis.com">
29
+ <!-- Pre-Fetch -->
30
+ <link rel="dns-prefetch" href="https://firebasestorage.googleapis.com">
31
+
32
+ <!-- Cascading Style Sheets -->
33
+ <link rel="stylesheet" href="demo/styles.css">
34
+
35
+ <!-- ECMA Script-->
36
+ <script>window.process = { env: { NODE_ENV: 'production' } };</script>
37
+
38
+ </head>
39
+ <!-- End Head -->
40
+
41
+ <!-- Start Body -->
42
+ <body>
43
+
44
+ <!-- Button -->
45
+ <header><user-icon settingsURL="/"></user-icon></header>
46
+
47
+ <!-- Drawer -->
48
+ <user-drawer></user-drawer>
49
+
50
+ <!-- Settings -->
51
+ <main><user-settings></user-settings></main>
52
+
53
+ <!-- CSS: Custom Variables: <head> tag -->
54
+ <style>
55
+
56
+ :root {
57
+
58
+ /* Top Border Color */
59
+ --pwa_divider: grey;
60
+
61
+ /* Section Header Color */
62
+ --pwa_section_header: black;
63
+
64
+ /* Navigation Colors */
65
+ --pwa_nav_button: grey;
66
+ --pwa_nav_select: black;
67
+
68
+ /* Label Color */
69
+ --pwa_label_text_color: black;
70
+
71
+ /* Input Colors */
72
+ --pwa_input_background: #E1E5EB;
73
+
74
+ /* Button Colors */
75
+ --pwa_action_text_color: #fff;
76
+ --pwa_action_background_color: #6cc04a;
77
+ --pwa_action_border_color: #60b23e;
78
+
79
+ /* Drawer Colors */
80
+ --pwa_drawer_text_color: #303030;
81
+ --pwa_drawer_background_color: #fff;
82
+
83
+ /* Icon Colors */
84
+ --pwa_icon_background: #6cc04a;
85
+ --pwa_icon_hover: lightgrey;
86
+
87
+ }
88
+
89
+ /* Dark Theme */
90
+ @media (prefers-color-scheme: dark) { }
91
+
92
+ /* Light Theme */
93
+ @media (prefers-color-scheme: light) { }
94
+
95
+ </style>
96
+
97
+ <!-- ECMA Script: Module: Firebase Information -->
98
+ <script>
99
+
100
+ // Global NameSpace - Create Object Initial State
101
+ let connect = {
102
+ apiKey: "AIzaSyC1ZNYC9RAjSAE3syUBNi47AiqbAqkx99w",
103
+ authDomain: "pwa-authentic.firebaseapp.com",
104
+ projectId: "pwa-authentic",
105
+ storageBucket: "pwa-authentic.firebasestorage.app",
106
+ messagingSenderId: "749233996232",
107
+ appId: "1:749233996232:web:bbc410d53b7d39bdfb80fd",
108
+ measurementId: "G-G1GYM1HBJ4"
109
+ }
110
+
111
+ </script>
112
+ <!-- End Custom JavaScript Module Information -->
113
+
114
+ <!-- Application Shell -->
115
+ <script type="module" src="pwa-auth.js" async></script>
116
+
117
+ </body>
118
+ </html>
@@ -0,0 +1,52 @@
1
+ html {
2
+ overflow: auto;
3
+ scroll-behavior: smooth;
4
+ display: grid;
5
+ height: 100%;
6
+ padding: 16px;
7
+ box-sizing: border-box;
8
+ transition-duration: 1s;
9
+ }
10
+
11
+ body {
12
+ overflow: hidden;
13
+ margin: 0;
14
+ font-family: Space Grotesk, system-ui, sans-serif;
15
+ -webkit-font-smoothing: antialiased;
16
+ font-size: .875rem;
17
+ line-height: 1.25rem;
18
+ }
19
+
20
+ body {
21
+ display: grid;
22
+ grid-template-areas:
23
+ "head"
24
+ "drawer"
25
+ "main";
26
+ grid-template-rows: auto auto 1fr;
27
+ }
28
+
29
+ header { grid-area: head; }
30
+ user-drawer { grid-area: drawer; }
31
+ main { grid-area: main; }
32
+
33
+ body {
34
+ background: linear-gradient(124deg, #e8891d, #e8b71d, #e3e81d, #1de840, #1ddde8, #2b1de8, #dd00f3, #dd00f3);
35
+ background-size: 1800%;
36
+ -webkit-animation: rainbow 64s cubic-bezier(0.6,0.8,0.8,0.6) infinite;
37
+ -z-animation: rainbow 64s cubic-bezier(0.6,0.8,0.8,0.6) infinite;
38
+ -o-animation: rainbow 64s cubic-bezier(0.6,0.8,0.8,0.6) infinite;
39
+ animation: rainbow 64s cubic-bezier(0.6,0.8,0.8,0.6) infinite;
40
+ }
41
+
42
+ @keyframes rainbow {
43
+ 0% {
44
+ background-position: 0% 100%;
45
+ }
46
+ 50% {
47
+ background-position: 100% 0%;
48
+ }
49
+ 100% {
50
+ background-position: 0% 100%;
51
+ }
52
+ }
Binary file
package/license CHANGED
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) Jack Markiewicz <jack.solutionbox@gmail.com> (jackspublishing.com)
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) Jacek Markiewicz <jack.solutionbox@gmail.com> (jackspublishing.com)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.