feat(webpage): showing you the menu, hopefully it works??
Some checks failed
/ build (push) Failing after 14s
/ deploy (push) Failing after 9s

This commit is contained in:
devaine 2026-06-14 22:33:24 -05:00
commit a727696e5b
Signed by: devaine
GPG key ID: 954B1DCAC6FF84EE
51 changed files with 8573 additions and 688 deletions

31
frontend/src/lib/auth.ts Normal file
View file

@ -0,0 +1,31 @@
import { betterAuth } from "better-auth";
import { genericOAuth, username } from "better-auth/plugins";
import { Pool } from "pg";
import "dotenv/config";
export const auth = betterAuth({
baseURL: process.env.BASE_URL,
database: new Pool({
connectionString: process.env.PG_CONNECTION_STRING,
}),
plugins: [
username(),
genericOAuth({
config: [
{
providerId: "keycloak",
clientId: process.env.OAUTH_CLIENT_ID as string,
clientSecret: process.env.OAUTH_CLIENT_SECRET as string,
pkce: true,
authorizationUrl: `${process.env.OAUTH_ISSUER}/protocol/openid-connect/auth`,
tokenUrl: `${process.env.OAUTH_ISSUER}/protocol/openid-connect/token`,
userInfoUrl: `${process.env.OAUTH_ISSUER}/protocol/openid-connect/userinfo`,
scopes: ["openid", "profile", "email"],
},
],
}),
],
});