From aa5fd309549e84fde4eca7ad120dbc3b59d33673 Mon Sep 17 00:00:00 2001 From: Ernst Widerberg Date: Fri, 22 Oct 2021 08:28:31 +0200 Subject: Enable login screen with mocked JWT server --- src/components/App.js | 4 ++-- src/components/Login.js | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/components/App.js b/src/components/App.js index 9ead9c5..636c672 100644 --- a/src/components/App.js +++ b/src/components/App.js @@ -56,8 +56,8 @@ class App extends React.Component { clearToken={this.clearToken} /> ); - // if (this.state.token === null) - // return ; + if (this.state.token === null) + return ; return (
diff --git a/src/components/Login.js b/src/components/Login.js index 209871e..9b45817 100644 --- a/src/components/Login.js +++ b/src/components/Login.js @@ -26,8 +26,7 @@ class Login extends React.Component { // NOTE: btoa() limits email, password to ASCII login(email, password) { - const url = process.env.JWT_URL + "/api/v1.0/auth"; - fetch(url, { + fetch(process.env.JWT_URL, { method: "POST", headers: { Authorization: "Basic " + btoa(email + ":" + password) } }) -- cgit v1.1