WIP: Extract process.env

Change-Id: I9efb1079c0c88e6e0272c5fda734a367aa8f84a3
This commit is contained in:
Manuel Stahl
2024-02-05 17:32:32 +01:00
parent 8688ab7d0e
commit 8c1546cd5a
3 changed files with 8 additions and 7 deletions
+3 -3
View File
@@ -1,10 +1,10 @@
import { fetchUtils } from "react-admin";
const authProvider = {
const authProvider = fixed_base_url => ({
// called when the user attempts to log in
login: ({ base_url, username, password, loginToken }) => {
// force homeserver for protection in case the form is manipulated
base_url = process.env.REACT_APP_SERVER || base_url;
base_url = fixed_base_url || base_url;
console.log("login ");
const options = {
@@ -86,6 +86,6 @@ const authProvider = {
},
// called when the user navigates to a new location, to check for permissions / roles
getPermissions: () => Promise.resolve(),
};
});
export default authProvider;