Skip to content

Scheduling infrastructure for absolutely everyone.

fix: oauth screen go back button not functional (#25401)

Anik Dhabal Babuc95b0833c13a
diff --git a/apps/web/modules/auth/oauth2/authorize-view.tsx b/apps/web/modules/auth/oauth2/authorize-view.tsx
index bcc7554c8e1..f528d2d2aec 100644
--- a/apps/web/modules/auth/oauth2/authorize-view.tsx
+++ b/apps/web/modules/auth/oauth2/authorize-view.tsx
@@ -157,7 +157,13 @@ export default function Authorize() {
className="mr-2"
color="minimal"
onClick={() => {
- window.location.href = `${client.redirectUri}`;
+ const separator = client.redirectUri.includes("?") ? "&" : "?";
+ const params = new URLSearchParams();
+ params.set("error", "access_denied");
+ if (state) {
+ params.set("state", state);
+ }
+ window.location.href = `${client.redirectUri}${separator}${params.toString()}`;
}}>
{t("go_back")}
</Button>