diff --git a/src/shared/components/app/error-page.tsx b/src/shared/components/app/error-page.tsx index ec352d42..996fcdb5 100644 --- a/src/shared/components/app/error-page.tsx +++ b/src/shared/components/app/error-page.tsx @@ -1,4 +1,5 @@ import { setIsoData } from "@utils/app"; +import removeAuthParam from "@utils/helpers/remove-auth-param"; import { Component } from "inferno"; import { T } from "inferno-i18next-dess"; import { Link } from "inferno-router"; @@ -58,7 +59,7 @@ export class ErrorPage extends Component { ### diff --git a/src/shared/utils/helpers/remove-auth-param.ts b/src/shared/utils/helpers/remove-auth-param.ts new file mode 100644 index 00000000..0702b102 --- /dev/null +++ b/src/shared/utils/helpers/remove-auth-param.ts @@ -0,0 +1,6 @@ +export default function (err: any) { + return err + .toString() + .replace(new RegExp("[?&]auth=[^&#]*(#.*)?$"), "$1") + .replace(new RegExp("([?&])auth=[^&]*&"), "$1"); +}