feat(auth): refactor authentication routes and enhance JWT handling
Build and Push Auth Portal Docker Image / build-and-push (push) Successful in 1m49s
Build and Push Auth Portal Docker Image / create-release (push) Skipped

- Removed unused permission and app retrieval logic from the login process.
- Introduced a new endpoint for reissuing access tokens to handle role changes and account switches.
- Updated JWT payload handling to improve clarity and maintainability.
- Enhanced the readJwtPayload function for better decoding of JWT claims.
This commit is contained in:
Denozordec
2026-07-19 02:22:23 +07:00
parent ed1699503a
commit 09ed7f4dc4
9 changed files with 206 additions and 84 deletions
+6 -2
View File
@@ -11,6 +11,7 @@ import {
} from 'lucide-react'
import type { AppSwitcherIconName } from '@authportal/shared'
import { appSwitcherQueryOptions } from '@/queries/app-switcher'
import { ssoOpenApp } from '@/lib/auth'
import {
DropdownMenu,
DropdownMenuContent,
@@ -89,8 +90,11 @@ export function AppSwitcher() {
return (
<DropdownMenuItem
key={app.id}
nativeButton={false}
render={<a href={app.url} target="_blank" rel="noreferrer" />}
onClick={() => {
void ssoOpenApp(app.url).catch(() => {
window.location.href = app.url.replace(/\/$/, '')
})
}}
>
<Icon />
{app.name}