sol-auth 1.0.4 → 1.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 (2) hide show
  1. package/README.md +78 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,78 @@
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
+
21
+ SignIn Option
22
+
23
+ ``` auth.signIn({
24
+ username: username,
25
+ password: pass,
26
+ salt: salt
27
+ });
28
+ ```
29
+
30
+ LogIn Option
31
+
32
+ ``` auth.logIn({
33
+ username: username,
34
+ password: password,
35
+ hashPassword: hashPassword
36
+ });
37
+ ```
38
+
39
+ LogIn with JWT Token
40
+
41
+ ``` auth.logIn({
42
+ username: username,
43
+ password: password ,
44
+ hashPassword: hashPassword ,
45
+ payload , secret, expiresIn
46
+ });
47
+ ```
48
+
49
+ Examples
50
+
51
+ ```
52
+ const signInFunction = async () => {
53
+ const signinData = await auth.signIn({
54
+ username: username,
55
+ password: pass,
56
+ salt: salt
57
+ });
58
+
59
+ console.log(signData);
60
+ }
61
+
62
+ signInFunction()
63
+ ```
64
+ ```
65
+ const logInFunction = async () =>{
66
+
67
+ const loginData = await auth.logIn({
68
+ username: username,
69
+ password: pass ,
70
+ hashPassword: hashPassword
71
+ });
72
+
73
+ console.log(loginData);
74
+ }
75
+
76
+ logInFunction()
77
+ ```
78
+ ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sol-auth",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",