From 28401867c783d96b1d1c5bbbc5c96980188e8a08 Mon Sep 17 00:00:00 2001 From: Hassan Abouelela Date: Thu, 14 Jul 2022 11:06:08 +0400 Subject: Clear Authorization On Error Deletes the OAuth cookies when an error happens during submit. This is a stopgap till we fix the authorization issues. Signed-off-by: Hassan Abouelela --- src/pages/FormPage/ErrorPage.tsx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/pages/FormPage') diff --git a/src/pages/FormPage/ErrorPage.tsx b/src/pages/FormPage/ErrorPage.tsx index 9a7fad9..da336cf 100644 --- a/src/pages/FormPage/ErrorPage.tsx +++ b/src/pages/FormPage/ErrorPage.tsx @@ -6,6 +6,7 @@ import React from "react"; import HeaderBar from "../../components/HeaderBar"; import {Form} from "../../api/forms"; +import {clearAuth} from "../../api/auth"; import {selectable, submitStyles, unselectable} from "../../commonStyles"; import Navigation from "./Navigation"; @@ -22,6 +23,8 @@ const refreshStyles = css` export default function ErrorPage(props: ErrorProps): JSX.Element { + clearAuth(); + return (
-- cgit v1.2.3