Compare commits

...

2 Commits

Author SHA1 Message Date
Aarnav Tale 156d7c9ee7 chore: v0.4.1 2025-01-18 08:18:28 +00:00
Aarnav Tale bd11453593 fix: store oidc redirect_uri in session for parity 2025-01-18 08:18:19 +00:00
4 changed files with 13 additions and 2 deletions
+4 -1
View File
@@ -1,4 +1,7 @@
### 0.4.0 (January 6, 2025)
### 0.4.1 (January 18, 2025)
- Fixed an urgent issue where the OIDC redirect URI would mismatch.
### 0.4.0 (January 18, 2025)
- Switched from Remix.run to React-Router
- Fixed an issue where some config fields were marked as required even if they weren't (fixes [#66](https://github.com/tale/headplane/issues/66))
- Fixed an issue where the toasts would be obscured by the footer (fixes [#68](https://github.com/tale/headplane/issues/68))
+7 -1
View File
@@ -34,13 +34,19 @@ export async function loader({ request }: LoaderFunctionArgs) {
const codeVerifier = session.get('oidc_code_verif');
const state = session.get('oidc_state');
const nonce = session.get('oidc_nonce');
const redirectUri = session.get('oidc_redirect_uri');
if (!codeVerifier || !state || !nonce) {
return send({ error: 'Missing OIDC state' }, { status: 400 });
}
// Reconstruct the redirect URI using the query parameters
// and the one we saved in the session
const flowRedirectUri = new URL(redirectUri);
flowRedirectUri.search = url.search;
const flowOptions = {
redirect_uri: request.url,
redirect_uri: flowRedirectUri.toString(),
codeVerifier,
state,
nonce: nonce === '<none>' ? undefined : nonce,
+1
View File
@@ -30,6 +30,7 @@ export async function loader({ request }: LoaderFunctionArgs) {
session.set('oidc_code_verif', data.codeVerifier);
session.set('oidc_state', data.state);
session.set('oidc_nonce', data.nonce);
session.set('oidc_redirect_uri', redirectUri)
return redirect(data.url, {
status: 302,
+1
View File
@@ -5,6 +5,7 @@ export type SessionData = {
oidc_state: string;
oidc_code_verif: string;
oidc_nonce: string;
oidc_redirect_uri: string;
agent_onboarding: boolean;
user: {
subject: string;