Skip to content

feat: Add OIDC authentication and SMTP email notifications#114

Merged
kittendevv merged 6 commits into
kittendevv:mainfrom
KeplerAeroIT:main
May 12, 2026
Merged

feat: Add OIDC authentication and SMTP email notifications#114
kittendevv merged 6 commits into
kittendevv:mainfrom
KeplerAeroIT:main

Conversation

@KeplerAeroIT
Copy link
Copy Markdown
Contributor

@KeplerAeroIT KeplerAeroIT commented May 8, 2026

Summary

  • OIDC / SSO authentication — adds a "Login with SSO" button to the login page, a /auth/callback route, and full OIDC session handling. Tested with Authentik; should work with any compliant OIDC provider. Supports optional auto-provisioning of new accounts on first SSO login.
  • SMTP email notifications — adds a "Send via Email" button on invoice detail pages. Configurable with any SMTP server (Gmail, Outlook, self-hosted, etc.). The invoice detail page shows the email delivery status after sending.
  • Templates — added two more templates for invoices

Changes

Area Files Description
OIDC backend/src/utils/oidc.ts, backend/src/routes/auth.ts OIDC provider integration and callback handling
OIDC frontend/src/routes/auth/callback/+server.ts, login/+page.svelte Frontend callback route and SSO login button
Email backend/src/utils/email.ts, backend/src/routes/admin.ts SMTP client and send-invoice-by-email endpoint
Email frontend/src/routes/invoices/[id]/+page.svelte, +page.server.ts Send email action and delivery status indicator
DB backend/src/database/init.ts, migrations.sql Schema additions for OIDC and email tracking
Config .env.example Documented all new SMTP and OIDC environment variables

Test plan

  • Configure OIDC credentials in .env, verify SSO login redirects and callback creates a valid session
  • Verify standard password login still works when OIDC is not configured (OIDC_ENABLED unset or false)
  • Configure SMTP credentials, open an invoice, send via email, verify delivery and status indicator update
  • Run with no SMTP config and confirm the send button is absent / gracefully disabled

@kittendevv
Copy link
Copy Markdown
Owner

Hi in your PR you list you have added two new invoice templates but when looking through your commits I don't see them anywhere.

You also provided a test checklist, have you tested the things you list there.

Anyway thank you for creating a PR! Would be happy to merge this.

@KeplerAeroIT
Copy link
Copy Markdown
Contributor Author

Hey, sorry. I forgot the push the Templates update. I've pushed it now.

I have independently verified and tested everything.

@kittendevv
Copy link
Copy Markdown
Owner

Ah, no worries! Everything looks good so I am gonna go ahead and merge this.

Thank you for your contribution!

@kittendevv kittendevv merged commit 8879966 into kittendevv:main May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants