This commit is contained in:
Karol Wypchlo 2021-04-01 22:46:41 +02:00
parent d51f5ea7a0
commit 5ae6f8fc40
2 changed files with 4 additions and 0 deletions

View File

@ -10,6 +10,8 @@ export default async (req, res) => {
res.setHeader("Set-Cookie", header["set-cookie"]); res.setHeader("Set-Cookie", header["set-cookie"]);
res.redirect(req.query.return_to ?? "/"); res.redirect(req.query.return_to ?? "/");
} catch (error) { } catch (error) {
console.log(error);
// credentials were correct but accounts service failed // credentials were correct but accounts service failed
res.redirect("/.ory/kratos/public/self-service/browser/flows/logout"); res.redirect("/.ory/kratos/public/self-service/browser/flows/logout");
} }

View File

@ -32,6 +32,8 @@ export async function getServerSideProps(context) {
throw new Error(`Failed to retrieve flow ${flow} with code ${status}`); throw new Error(`Failed to retrieve flow ${flow} with code ${status}`);
} catch (error) { } catch (error) {
console.log(error);
return { return {
redirect: { redirect: {
permanent: false, permanent: false,