Skip to content

Commit 7a6f1f1

Browse files
init
0 parents  commit 7a6f1f1

27 files changed

+7860
-0
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 pilcrowonpaper
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 all
13+
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 THE
21+
SOFTWARE.

README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# github.com/faroedev/faroe
2+
3+
_Documentation at [faroe.dev](https://faroe.dev)._
4+
5+
_This software is in active development and has only gone through minimal testing._
6+
7+
Faroe is a modular auth server distributed as a Go package.
8+
9+
```
10+
go get github.com/faroedev/faroe
11+
```
12+
13+
Some key features of the server:
14+
15+
1. Takes care of all the hard parts. Passwords, email address verification, sessions, rate limiting, password resets, and more.
16+
2. Extends your existing user database instead of replacing it. Own and customize your user data. No more data synchronization between servers.
17+
3. No direct connections to your database. Just basic HTTP requests.
18+
4. Only ephemeral data is stored. Less things to manage and worry about.
19+
20+
```ts
21+
const result = await client.createSignup(emailAddress);
22+
if (!result.ok) {
23+
console.log(result.errorCode);
24+
return;
25+
}
26+
console.log(result.signup);
27+
window.localStorage.setItem("signup_token", result.signupToken);
28+
```
29+
30+
The package has no hard dependencies. All you need is a key-value store and an email server.
31+
32+
```go
33+
package main
34+
35+
import "github.com/faroedev/faroe"
36+
37+
func main() {
38+
server := faroe.NewServer(
39+
mainStorage,
40+
cache,
41+
rateLimitStorage,
42+
logger,
43+
userPasswordHashAlgorithms,
44+
temporaryPasswordHashAlgorithm,
45+
cpuCount,
46+
faroe.RealClock,
47+
faroe.AllowAllEmailAddresses,
48+
emailSender,
49+
userActionInvocationEndpointClient,
50+
sessionConfig,
51+
)
52+
}
53+
```
54+
55+
Only password authentication is supported. Support for passkeys and 2FA are planned but there are no immediate plans to add social login (e.g. Sign in with Google).

0 commit comments

Comments
 (0)