renamed site directory to server

This commit is contained in:
2026-01-11 15:27:54 -07:00
parent 889aead6b6
commit ae01554b0b
65 changed files with 123 additions and 49 deletions
+8 -1
View File
@@ -5,6 +5,7 @@ import (
"encoding/json"
"errors"
"fmt"
"log/slog"
"net/url"
"time"
@@ -36,6 +37,7 @@ const (
type (
// Authenticator is used to authenticate our users.
Authenticator struct {
log *slog.Logger
*oidc.Provider
oauth2.Config
db *pgxpool.Pool
@@ -59,7 +61,11 @@ type (
)
// New instantiates the *Authenticator.
func New(ctx context.Context, db *pgxpool.Pool) (*Authenticator, error) {
func New(
ctx context.Context,
db *pgxpool.Pool,
logger *slog.Logger,
) (*Authenticator, error) {
provider, err := oidc.NewProvider(
ctx,
"https://"+AUTH0_DOMAIN+"/",
@@ -69,6 +75,7 @@ func New(ctx context.Context, db *pgxpool.Pool) (*Authenticator, error) {
}
return &Authenticator{
log: logger,
Provider: provider,
Config: oauth2.Config{
ClientID: AUTH0_CLIENT_ID,