No description
Find a file
Hardik 56817a7d86 feat(auth): add Microsoft 365 SSO via Azure Entra ID
Adds the Microsoft Entra ID provider to NextAuth alongside the existing
credentials provider. Sign-in is restricted to Pelagia Marine's M365
tenant via the issuer URL; access is further gated by requiring a
matching active user record in the DB (DB-managed roles remain unchanged).

- auth.ts: add MicrosoftEntra provider, signIn callback (DB lookup),
  async jwt callback to populate id/role on first SSO sign-in
- login-form.tsx: add primary "Sign in with Microsoft 365" button with
  Microsoft logo; credentials form kept as a fallback below a divider
- prisma: make passwordHash nullable (migration applied) to allow
  SSO-only users without a local password
- admin/users: password is now optional when creating a user — leave
  blank for SSO-only accounts
- profile/actions: return a clear error if an SSO user (no passwordHash)
  attempts to use the change-password form
- .env.example: document AZURE_AD_CLIENT_ID/SECRET/TENANT_ID

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 22:48:37 +05:30
.claude fix(gst): 0% GST rate no longer falls back to 18% 2026-05-27 00:00:51 +05:30
App feat(auth): add Microsoft 365 SSO via Azure Entra ID 2026-05-28 22:48:37 +05:30
Docs docs: consolidate design notes and test report 2026-05-22 17:15:38 +05:30
GstService fix: preserve tracked request typing 2026-05-22 17:39:26 +05:30
Progress chore(progress): mark ID autogeneration as done 2026-05-28 15:23:35 +05:30
static fix(static): prevent mobile layout overflow 2026-05-22 18:11:31 +05:30
Wireframe docs: consolidate design notes and test report 2026-05-22 17:15:38 +05:30
.gitignore Merge branch 'master' of ssh://87.76.191.133/home/shad0w/git/Peliagia_Portal 2026-05-22 17:41:14 +05:30
generate_po.py chore(inventory): remove item detail page; move SiteSelect to shared components 2026-05-16 00:07:04 +05:30
inspect_po.py chore(inventory): remove item detail page; move SiteSelect to shared components 2026-05-16 00:07:04 +05:30
test-report-2026-05-17.md docs: consolidate design notes and test report 2026-05-22 17:15:38 +05:30