UI: add auth flow and related errors

This commit is contained in:
41666 2019-03-19 20:26:47 -05:00
parent ff67bc3f1b
commit bbb34f1771
6 changed files with 226 additions and 74 deletions

View file

@ -1,7 +1,7 @@
import Router from 'next/router'
export default (context, target) => {
if (context.res) {
if (context && context.res) {
// server
// 303: "See other"
context.res.writeHead(303, { Location: target })