ideal-auth 0.1.0 → 0.2.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.
- package/README.md +2 -0
- package/dist/bin/ideal-auth.js +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Auth primitives for the JS ecosystem. Zero framework dependencies. Inspired by Laravel's `Auth` and `Hash` facades.
|
|
4
4
|
|
|
5
|
+
**[Documentation](https://ramonmalcolm10.github.io/ideal-auth/)**
|
|
6
|
+
|
|
5
7
|
Provide a cookie bridge (3 functions) once during setup, and `auth().login(user)` just works — handles session creation, cookie encryption, and storage internally via [iron-session](https://github.com/vvo/iron-session).
|
|
6
8
|
|
|
7
9
|
## Install
|
package/dist/bin/ideal-auth.js
CHANGED
|
@@ -5,9 +5,13 @@ switch (command) {
|
|
|
5
5
|
case 'secret':
|
|
6
6
|
console.log(`IDEAL_AUTH_SECRET=${randomBytes(32).toString('base64url')}`);
|
|
7
7
|
break;
|
|
8
|
+
case 'encryption-key':
|
|
9
|
+
console.log(`ENCRYPTION_KEY=${randomBytes(32).toString('hex')}`);
|
|
10
|
+
break;
|
|
8
11
|
default:
|
|
9
12
|
console.log('Usage: ideal-auth <command>\n');
|
|
10
13
|
console.log('Commands:');
|
|
11
|
-
console.log(' secret
|
|
14
|
+
console.log(' secret Generate an IDEAL_AUTH_SECRET for your .env file');
|
|
15
|
+
console.log(' encryption-key Generate an ENCRYPTION_KEY for encrypting data at rest');
|
|
12
16
|
break;
|
|
13
17
|
}
|