fix: add back homeserver force protection

This commit is contained in:
Nya Candy 2021-10-14 20:07:10 +08:00
parent e6a17b41f0
commit 869b721d07
No known key found for this signature in database
GPG Key ID: 8B1BE5E86F2E66AE

View File

@ -3,8 +3,9 @@ import { fetchUtils } from "react-admin";
const authProvider = {
// called when the user attempts to log in
login: ({ base_url, username, password, loginToken }) => {
console.log("login to ", base_url);
console.log("login token ", loginToken);
// force homeserver for protection in case the form is manipulated
base_url = process.env.REACT_APP_SERVER || base_url;
let options;
if (username && password) {
options = {