├── smart.json ├── package.js ├── steam.js └── steam_login_button.css /smart.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "accounts-steam", 3 | "description": "Login service for Steam accounts", 4 | "homepage": "https://github.com/Multiply/meteor-accounts-steam", 5 | "author": "Jens Ulrich Hjuler Pedersen (http://juhp.net)", 6 | "version": "0.0.1", 7 | "git": "https://github.com/Multiply/meteor-accounts-steam.git", 8 | "packages": { 9 | "steam": "0.0.1" 10 | } 11 | } -------------------------------------------------------------------------------- /package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Login service for Steam accounts" 3 | }); 4 | 5 | Package.on_use(function(api) { 6 | api.use(['underscore', 'random']); 7 | api.use('accounts-base', ['client', 'server']); 8 | // Export Accounts (etc) to packages using this one. 9 | api.imply('accounts-base', ['client', 'server']); 10 | api.use('accounts-oauth', ['client', 'server']); 11 | api.use('steam', ['client', 'server']); 12 | 13 | api.add_files('steam_login_button.css', 'client'); 14 | 15 | api.add_files("steam.js"); 16 | }); 17 | -------------------------------------------------------------------------------- /steam.js: -------------------------------------------------------------------------------- 1 | Accounts.oauth.registerService('steam'); 2 | 3 | if (Meteor.isClient) { 4 | Meteor.loginWithSteam = function(options, callback) { 5 | // support a callback without options 6 | if (! callback && typeof options === "function") { 7 | callback = options; 8 | options = null; 9 | } 10 | 11 | var credentialRequestCompleteCallback = Accounts.oauth.credentialRequestCompleteHandler(callback); 12 | Steam.requestCredential(options, credentialRequestCompleteCallback); 13 | }; 14 | } else { 15 | Accounts.addAutopublishFields({ 16 | forLoggedInUser: ['services.steam'], 17 | forOtherUsers: ['services.steam.username'] 18 | }); 19 | } 20 | -------------------------------------------------------------------------------- /steam_login_button.css: -------------------------------------------------------------------------------- 1 | #login-buttons-image-steam { 2 | background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAflJREFUeNqMU82roWEU/3Ffw0YjIpGVhY/srMmSnT9AdyHFQlMWY8msJMNi2EiisGOlyIJJkWwsWEhiI6F8NAtK+Zr3fS63meZiTp06Pc/5/P3OYen1+k8AvtP6SqsA/ye/aM3Q+pW6Bn95FiGTyUBRFKbTKc7ns+AWQ10r3xW1Wg2/3w+lUonT6YT1eo1AIIBWq8V8v7LoES73gkUiEfL5PAqFAqrVKulAo9HA4/HA4XBgMBiA/ai61WolTqPRCLlcDplMBkKhEMViETabjfg8TKDT6dDtdmE2m8Fmv7laLBb0ej0oFIrHCUwmEwwGA1QqFZrN5vt7o9Egb7PZDDcQP0Tc5/MR22g0otPpwG63g8vlQiAQEFDdbjf5Z5VKpQtTod1uE8S9Xi/kcjk4HM5fSXe7HQ6HAxklFAqhUqm8JbjQwhgMRTS/pFo0GiXVIpEIAY2RcrlM2BgOh9jv9++JWfP5/CKVSv8ZI5vNYrVawel0IhgMkgQfyUu9Xv9Wq9UgFotJNYZrps3JZEKA2m63SCaTd5kiII7HY6RSKWi1WrhcLvD5fCwWC8RiMYTD4YcrTl0PQ9Dv95FIJBCPx7FcLiGRSJBOp28re/eomFX+8ecx8Xg8siRM+wzyTyT6QnP+kzY+06pi4o/HIzabDaHsyTknmHP+LcAASVHHFg/IoHAAAAAASUVORK5CYII=); 3 | } 4 | --------------------------------------------------------------------------------