Skip to content

Commit ae01aee

Browse files
committed
chore: upgrade next to 16.3 canary
1 parent b4fad62 commit ae01aee

5 files changed

Lines changed: 369 additions & 201 deletions

File tree

‎lib/oidc.ts‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,22 @@ export async function fetchOidcProviders(serverHost: string): Promise<OidcProvid
2020
}
2121

2222
/**
23-
* Redirect the browser to the OIDC authorization endpoint.
23+
* Build the backend OIDC authorization endpoint URL.
2424
*/
25-
export function initiateOidcLogin(serverHost: string, providerId: string, redirectAfter?: string): void {
25+
export function buildOidcLoginUrl(serverHost: string, providerId: string, redirectAfter?: string): string {
2626
let url = `${serverHost}/rustfs/admin/v3/oidc/authorize/${encodeURIComponent(providerId)}`
2727
if (redirectAfter) {
2828
url += `?redirect_after=${encodeURIComponent(redirectAfter)}`
2929
}
30-
window.location.href = url
30+
return url
31+
}
32+
33+
/**
34+
* Redirect the browser to the OIDC authorization endpoint.
35+
*/
36+
export function initiateOidcLogin(serverHost: string, providerId: string, redirectAfter?: string): void {
37+
const url = buildOidcLoginUrl(serverHost, providerId, redirectAfter)
38+
window.location.href = new URL(url, window.location.origin).href
3139
}
3240

3341
/**

‎package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"i18next": "^26.3.1",
3737
"i18next-browser-languagedetector": "^8.2.1",
3838
"input-otp": "^1.4.2",
39-
"next": "^16.2.9",
39+
"next": "16.3.0-canary.74",
4040
"next-themes": "^0.4.6",
4141
"node-forge": "^1.4.0",
4242
"react": "^19.2.7",
@@ -59,7 +59,7 @@
5959
"@types/react": "^19.2.17",
6060
"@types/react-dom": "^19.2.3",
6161
"eslint": "^9.39.4",
62-
"eslint-config-next": "^16.2.9",
62+
"eslint-config-next": "16.3.0-canary.74",
6363
"eslint-config-prettier": "^10.1.8",
6464
"prettier": "^3.8.4",
6565
"tailwindcss": "^4.3.0",

0 commit comments

Comments
 (0)