Implement verified email registration and queued TLS delivery
Foundry Go checks / check (push) Successful in 1m52s
Foundry Go checks / check (pull_request) Successful in 1m53s

This commit is contained in:
2026-11-05 18:31:09 +08:00
parent 1b756d36ce
commit 0d0521f13d
8 changed files with 381 additions and 6 deletions
+7 -1
View File
@@ -1,6 +1,7 @@
package main
import (
"context"
"encoding/json"
"log"
"net"
@@ -46,7 +47,12 @@ func main() {
}
db := stdlib.OpenDB(*config)
defer db.Close()
handler, err := auth.New(db, callbacks, origin.ResolveReference(&url.URL{Path: "/auth/google/callback"}).String(), id, secret)
email, err := auth.EmailConfigFromEnv()
if err != nil {
log.Fatal(err)
}
go email.Run(context.Background(), db)
handler, err := auth.New(db, callbacks, origin.ResolveReference(&url.URL{Path: "/auth/google/callback"}).String(), id, secret, email)
if err != nil {
log.Fatal(err)
}