You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 6, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+13-10Lines changed: 13 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,12 @@ _Dead simple user account system so easy a ~~caveman~~ **cow** could do it._
4
4
5
5
The goal of Accownt is to be a full-featured, standalone account system that's straightforward for developers and users, easy to maintain, and as customizable as possible without introducing too much complexity.
6
6
7
-

7
+

8
8
9
9
Built and mantained by **[Ptorx](https://ptorx.com)** and other **[Xyfir](https://www.xyfir.com)** projects.
@@ -18,15 +20,12 @@ Built and mantained by **[Ptorx](https://ptorx.com)** and other **[Xyfir](https:
18
20
- Email verification
19
21
- Plug in your SMTP credentials for Mailgun, Gmail, or anything else
20
22
- Account recovery
21
-
- Via passwordless login feature
23
+
- Account deletion
22
24
- No dependencies other than Node and what npm will install
23
-
- Older Node versions not actively supported
24
25
- No database needed
25
-
- Users are simple JSON files stored to disk
26
26
- Standalone server and web client
27
27
- Easy integration into new and existing applications of any stack
28
28
- reCAPTCHA v2 support
29
-
- Optional, just set your reCAPTCHA key
30
29
- JSON Web Tokens (JWT)
31
30
- Shared JWT and cookie between Accownt and your app for session authentication
32
31
- Easy theming + light and dark themes
@@ -43,7 +42,7 @@ As simple as Accownt is, you'll still need to install, configure, build, and int
43
42
## Step 0: Clone the repo
44
43
45
44
```bash
46
-
git clone https://github.com/Xyfir/accownt.git
45
+
git clone https://github.com/xyfir/accownt.git
47
46
cd accownt
48
47
```
49
48
@@ -78,7 +77,7 @@ cp web/example.env web/.env
78
77
79
78
### Step 2b: Edit `.env` files
80
79
81
-
Edit the files `server/.env` and `web/.env`. Update the config keys with your own values. You can find descriptions for each one under the `Accownt` -> `Env` namespaces in the [type definitions](https://github.com/Xyfir/accownt/blob/master/types/accownt.d.ts). Use the appropriate `interface` for each corresponding file.
80
+
Edit the files `server/.env` and `web/.env`. Update the config keys with your own values. You can find descriptions for each one under the `Accownt` -> `Env` namespaces in the [type definitions](https://github.com/xyfir/accownt/blob/master/types/accownt.d.ts). Use the appropriate `interface` for each corresponding file.
82
81
83
82
## Step 3: Build from source
84
83
@@ -115,12 +114,16 @@ To be a bit more specific:
115
114
2. If your app utilizes the JWT cookie that Accownt sets then all you need to do is verify the token with each request via [jsonwebttoken](https://www.npmjs.com/package/jsonwebtoken#jwtverifytoken-secretorpublickey-options-callback) or the equivalent in your preferred language.
116
115
3. Once the JWT is verified and decoded, you can retrieve the `userId` and `email` properties from it to use however you need. Note that `userId` is a unix timestamp in milliseconds (13 digits!) that corresponds to when the user created their account. Also keep in mind that if your app is receiving a JWT, the user's email has already been verified.
117
116
4. If the JWT is invalid or expired, redirect them back to the Accownt form or to unauthenticated parts of your app.
118
-
5. Lastly, you'll need a route somewhere to catch redirections and tokens from Accownt after each successful login. You set this already in your config.
119
-
6. Optionally, you can also add a link somewhere that takes _authenticated_ users to Accownt so they can modify their account information, like their password or 2FA.
117
+
5. Lastly, you'll need a route somewhere to catch redirections and tokens from Accownt after each successful login. You set this already in your
118
+
119
+
There are also some optional steps you can take to improve the user experience:
120
+
121
+
1. You can also add a link somewhere that takes _authenticated_ users to Accownt so they can modify their account information, like their password or 2FA.
122
+
2. You can allow users to delete their accounts by configuring the proper environment variables.
120
123
121
124
# Example
122
125
123
-
A working example can be found in [Ptorx](https://github.com/Xyfir/ptorx).
126
+
A working example can be found in [Ptorx](https://github.com/xyfir/ptorx).
0 commit comments