WIP: Extract process.env
Change-Id: I9efb1079c0c88e6e0272c5fda734a367aa8f84a3
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user