diff --git a/vendor/simplesamlphp/simplesamlphp/config/config.php b/vendor/simplesamlphp/simplesamlphp/config/config.php
index c4b5de123a05dcf1dd234dfb29bf423fa8d597a2..578d36b00175ec3c6776feb4b9c70736f6b9e585 100644
--- a/vendor/simplesamlphp/simplesamlphp/config/config.php
+++ b/vendor/simplesamlphp/simplesamlphp/config/config.php
@@ -6,7 +6,7 @@
 if (empty($_SERVER['PATH_INFO']) && !empty($_SERVER['DOCUMENT_URI'])) {
     $index = strpos($_SERVER['DOCUMENT_URI'], '.php');
     if($index) {
-            $_SERVER['PATH_INFO'] = substr($_SERVER['DOCUMENT_URI'], $index+4);
+      $_SERVER['PATH_INFO'] = substr($_SERVER['DOCUMENT_URI'], $index+4);
     }
 }
 
@@ -22,6 +22,15 @@
 $drop_id = $ps['conf']['pantheon_binding'];
 $db = $ps['databases']['default']['default'];
 
+
+if($_SERVER['HOME'] == '/') {
+  $temp_path = '/tmp';
+}
+else {
+  $temp_path = $_SERVER['HOME'] . '/tmp/simplesaml';
+}
+// error_log("temp_path: " . $temp_path);
+
 //  Set metadata path
 $metadata_folder = __DIR__ . '/../../../../web/sites/default/files/private/simplesamlphp/metadata';
 // error_log("config.php - metadata_folder: $metadata_folder");
@@ -126,7 +135,7 @@
     'certdir' => $cert_folder,
     'loggingdir' => 'log/',
     'datadir' => 'data/',
-    'tempdir'               =>  '/srv/bindings/' . $drop_id . '/tmp/simplesaml',
+    'tempdir'               =>  $temp_path,
     'supressportnumber'     => TRUE,
     'cronkey'				=> '5nvD3MgHLDDStnEKgK0au3vhqEjNNnvkHLmbVWvObIl2lpx0guXx5h',