diff --git a/sandstorm-pkgdef.capnp b/sandstorm-pkgdef.capnp index 78c35eb58..c25385cad 100644 --- a/sandstorm-pkgdef.capnp +++ b/sandstorm-pkgdef.capnp @@ -226,7 +226,7 @@ const pkgdef :Spk.PackageDefinition = ( verbPhrase = (defaultText = "removed from card"), ), ], ), - apiPath = "/api", + apiPath = "/", saveIdentityCaps = true, ), ); diff --git a/server/authentication.js b/server/authentication.js index d0d71e4d3..4d3cc53e7 100644 --- a/server/authentication.js +++ b/server/authentication.js @@ -16,27 +16,6 @@ Meteor.startup(() => { Authentication = {}; Authentication.checkUserId = function (userId) { - if (userId === undefined) { - // Monkey patch to work around the problem described in - // https://github.com/sandstorm-io/meteor-accounts-sandstorm/pull/31 - const _httpMethods = HTTP.methods; - HTTP.methods = (newMethods) => { - Object.keys(newMethods).forEach((key) => { - if (newMethods[key].auth) { - newMethods[key].auth = function() { - const sandstormID = this.req.headers['x-sandstorm-user-id']; - const user = Meteor.users.findOne({'services.sandstorm.id': sandstormID}); - if (user) { - userId = user._id; - } - //return user && user._id; - }; - } - }); - _httpMethods(newMethods); - }; - } - if (userId === undefined) { const error = new Meteor.Error('Unauthorized', 'Unauthorized'); error.statusCode = 401;