New login screen (#1331)

* wip

* feat: first draft of auth.config

* chore: auth methodS

* chore: styling

* styling, styling, styling

* feat: Auth notices

* chore: Remove server-rendered pages, move shared/components -> components

* lint

* cleanup

* cleanup

* fix: Remove unused component

* fix: Ensure env variables in prod too

* style tweaks

* fix: Entering SSO email into login form fails
fix: Tweak language around guest signin
This commit is contained in:
Tom Moor
2020-07-09 22:33:07 -07:00
committed by GitHub
parent 75561079eb
commit 5cb04d7ac1
128 changed files with 769 additions and 2264 deletions

View File

@ -34,6 +34,7 @@ class ApiClient {
) => {
let body;
let modifiedPath;
let urlToFetch;
if (method === "GET") {
if (data) {
@ -45,6 +46,12 @@ class ApiClient {
body = data ? JSON.stringify(data) : undefined;
}
if (path.match(/^http/)) {
urlToFetch = modifiedPath || path;
} else {
urlToFetch = this.baseUrl + (modifiedPath || path);
}
// Construct headers
const headers = new Headers({
Accept: "application/json",
@ -60,7 +67,7 @@ class ApiClient {
let response;
try {
response = await fetch(this.baseUrl + (modifiedPath || path), {
response = await fetch(urlToFetch, {
method,
body,
headers,