diff --git a/app/index.html b/app/index.html
index a63cf27..52dfea8 100644
--- a/app/index.html
+++ b/app/index.html
@@ -42,7 +42,7 @@
-
+
diff --git a/app/scripts/app.js b/app/scripts/app.js
index 0ae6044..a1ffbe4 100644
--- a/app/scripts/app.js
+++ b/app/scripts/app.js
@@ -50,7 +50,7 @@ ShareDrop.App.deferReadiness();
ShareDrop.App.userId = data.id;
ShareDrop.App.publicIp = data.public_ip;
- ref.auth(data.token, function (error) {
+ ref.authWithCustomToken(data.token, function (error) {
error ? reject(error) : resolve();
});
});
diff --git a/app/server.js b/app/server.js
index 7424b45..d9dd41c 100644
--- a/app/server.js
+++ b/app/server.js
@@ -74,13 +74,13 @@ module.exports.server = function (options) {
app.get('/auth', function (req, res) {
var ip = req.headers['cf-connecting-ip'] || req.ip,
- id = uuid.v1(),
+ uid = uuid.v1(),
token = firebaseTokenGenerator.createToken(
- {id: id}, // will be available in Firebase security rules as 'auth'
+ {uid: uid, id: uid}, // will be available in Firebase security rules as 'auth'
{expires: 32503680000} // 01.01.3000 00:00
);
- res.json({id: id, token: token, public_ip: ip});
+ res.json({id: uid, token: token, public_ip: ip});
});
return http.createServer(app);