diff --git a/frontend/bootloader.html b/frontend/bootloader.html
new file mode 100644
index 0000000..d54899e
--- /dev/null
+++ b/frontend/bootloader.html
@@ -0,0 +1,214 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lib/Routes/Account.php b/lib/Routes/Account.php
index 87ed8c8..6528da3 100644
--- a/lib/Routes/Account.php
+++ b/lib/Routes/Account.php
@@ -27,7 +27,7 @@ public static function requireLoggedInUser() {
public static function respondToDashboard() {
$user = User::getUser(Session::getLoggedInUser());
- echo "Logged in as " . $user['webId'];
+ include_once(FRONTENDDIR . "bootloader.html");
}
public static function respondToLogout() {
@@ -170,8 +170,9 @@ public static function respondToLogin() {
}
if (User::checkPassword($_POST['username'], $_POST['password'])) {
Session::start($_POST['username']);
+ $user = User::getUser($_POST['username']);
if (!isset($_POST['redirect_uri']) || $_POST['redirect_uri'] === '') {
- header("Location: /dashboard/");
+ header("Location: /dashboard/#autologin/" . urlencode($user['webId']));
exit();
}
header("Location: " . urldecode($_POST['redirect_uri'])); // FIXME: Do we need to harden this?
diff --git a/lib/Routes/SolidStorage.php b/lib/Routes/SolidStorage.php
index 5b90424..97ffe01 100644
--- a/lib/Routes/SolidStorage.php
+++ b/lib/Routes/SolidStorage.php
@@ -43,7 +43,7 @@ public static function respondToStorage() {
$owner = StorageServer::getOwner();
$allowedClients = $owner['allowedClients'] ?? [];
- $allowedOrigins = [];
+ $allowedOrigins = TRUSTED_APPS ?? [];
foreach ($allowedClients as $clientId) {
$clientRegistration = ClientRegistration::getRegistration($clientId);
if (isset($clientRegistration['client_name'])) {
diff --git a/lib/Routes/SolidUserProfile.php b/lib/Routes/SolidUserProfile.php
index 287c7f8..e25221b 100644
--- a/lib/Routes/SolidUserProfile.php
+++ b/lib/Routes/SolidUserProfile.php
@@ -46,7 +46,7 @@ public static function respondToProfile() {
$owner = ProfileServer::getOwner();
$allowedClients = $owner['allowedClients'] ?? [];
- $allowedOrigins = [];
+ $allowedOrigins = TRUSTED_APPS ?? [];
foreach ($allowedClients as $clientId) {
$clientRegistration = ClientRegistration::getRegistration($clientId);
if (isset($clientRegistration['client_name'])) {
diff --git a/lib/StorageServer.php b/lib/StorageServer.php
index 12ac7d0..5c56eb0 100644
--- a/lib/StorageServer.php
+++ b/lib/StorageServer.php
@@ -237,14 +237,13 @@ public static function generateDefaultPreferences() {
@prefix : <#>.
@prefix sp: .
@prefix dct: .
-@prefix profile: <$webId>.
@prefix solid: .
<>
a sp:ConfigurationFile;
dct:title "Preferences file".
-profile:me
+<$webId>
a solid:Developer;
solid:privateTypeIndex ;
solid:publicTypeIndex .