sol-auth 1.0.4 → 1.0.5

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 (2) hide show
  1. package/README.md +53 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,53 @@
1
+ # sol-auth
2
+
3
+ ---
4
+
5
+ A package for the signIn and logIn with less code.
6
+ Just import and use it in your project.
7
+
8
+
9
+ # Install
10
+ ---
11
+ ``` npm i sol-auth
12
+
13
+ # Uses
14
+ ---
15
+
16
+ Import the package
17
+
18
+ ``` const auth = require("sol-auth")
19
+
20
+ SignIn Option
21
+
22
+ ``` auth.signIn({ username: username, password: pass, salt: salt })
23
+
24
+ LogIn Option
25
+
26
+ ``` auth.logIn({username: username, password: password , hashPassword: hashPassword })
27
+
28
+ LogIn with JWT Token
29
+
30
+ ``` auth.logIn({username: username, password: password , hashPassword: hashPassword , payload , secret, expiresIn})
31
+
32
+ Examples
33
+
34
+ ```
35
+ const signInFunction = async () => {
36
+ const signinData = await auth.signIn({ username: username, password: pass, salt: salt })
37
+
38
+ console.log(signData)
39
+ }
40
+
41
+ signInFunction()
42
+
43
+ ```
44
+ const logInFunction = async () =>{
45
+
46
+ const loginData = await auth.logIn({username: username, password: pass , hashPassword: hashPassword })
47
+
48
+ console.log(loginData)
49
+ }
50
+
51
+ logInFunction()
52
+
53
+ ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sol-auth",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",