oauth half done

This commit is contained in:
Senad Uka
2018-08-05 16:26:28 +02:00
parent 8a28915f87
commit 82a9c9c8a4
5 changed files with 416 additions and 66 deletions

View File

@@ -1,3 +1,88 @@
const fs = require('fs');
const path = require('path');
const http = require('http');
const url = require('url');
const querystring = require('querystring');
const opn = require('opn');
const destroyer = require('server-destroy');
const {google} = require('googleapis');
const plus = google.plus('v1');
const keys = sails.config.custom.googleapi;
/**
* Create a new OAuth2 client with the configured keys.
*/
const oauth2Client = new google.auth.OAuth2(
keys.client_id,
keys.client_secret,
keys.redirect_uris[0]
);
/**
* This is one of the many ways you can configure googleapis to use authentication credentials. In this method, we're setting a global reference for all APIs. Any other API you use here, like google.drive('v3'), will now use this auth client. You can also override the auth client at the service and method call levels.
*/
google.options({ auth: oauth2Client });
/**
* Open an http server to accept the oauth callback. In this simple example, the only request to our webserver is to /callback?code=<code>
*/
async function authenticate (scopes) {
return new Promise((resolve, reject) => {
// grab the url that will be used for authorization
const authorizeUrl = oauth2Client.generateAuthUrl({
access_type: 'offline',
scope: scopes.join(' ')
});
const server = http.createServer(async (req, res) => {
try {
if (req.url.indexOf('/oauth2callback') > -1) {
const qs = querystring.parse(url.parse(req.url).query);
res.end('Authentication successful! Please return to the console.');
server.destroy();
const {tokens} = await oauth2Client.getToken(qs.code);
oauth2Client.credentials = tokens;
resolve(oauth2Client);
}
} catch (e) {
reject(e);
}
}).listen(3000, () => {
// open the browser to the authorize url to start the workflow
opn(authorizeUrl, {wait: false}).then(cp => cp.unref());
});
destroyer(server);
});
}
async function runSample () {
// retrieve user profile
const res = await plus.people.get({ userId: 'me' });
console.log(res.data);
}
const scopes = ['https://www.googleapis.com/auth/plus.me'];
/* authenticate(scopes)
.then(client => runSample(client))
.catch(console.error); */
function authUrl() {
const authorizeUrl = oauth2Client.generateAuthUrl({
access_type: 'offline',
scope: scopes.join(' ')
});
return authorizeUrl;
}
module.exports = {
@@ -17,15 +102,19 @@ module.exports = {
responseType: 'view',
viewTemplatePath: 'pages/users/signin'
}
},
fn: async function (inputs, exits) {
return exits.success({ url: "//hamo.com" });
const url = authUrl();
return exits.success({ url: url });
}
};

View File

@@ -19,5 +19,15 @@ module.exports.custom = {
// mailgunSecret: 'key-testkeyb183848139913858e8abd9a3',
// stripeSecret: 'sk_test_Zzd814nldl91104qor5911gjald',
// …
googleapi: {
client_id: "476944563000-d67eqeknurvvlm87bi5aa2246dvds2tj.apps.googleusercontent.com",
project_id: "testsenaduka",
auth_uri: "https://accounts.google.com/o/oauth2/auth",
token_uri: "https://www.googleapis.com/oauth2/v3/token",
auth_provider_x509_cert_url: "https://www.googleapis.com/oauth2/v1/certs",
client_secret: "Jx47rhj8uuidT_5kWDbKXWh0",
redirect_uris: ["http://localhost:1337/home"]
}
};

361
package-lock.json generated
View File

@@ -331,6 +331,16 @@
"resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz",
"integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg=="
},
"axios": {
"version": "0.18.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz",
"integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=",
"dev": true,
"requires": {
"follow-redirects": "^1.3.0",
"is-buffer": "^1.1.5"
}
},
"babel-code-frame": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
@@ -467,6 +477,12 @@
"through": "^2.3.7"
}
},
"buffer-equal-constant-time": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
"integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=",
"dev": true
},
"buffer-from": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
@@ -596,10 +612,10 @@
"integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
"dev": true
},
"coffee-script": {
"coffeescript": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.10.0.tgz",
"integrity": "sha1-EpOLz5vhlI+gBvkuDEyegXBRCMA="
"resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-1.10.0.tgz",
"integrity": "sha1-56qDAZF+9iGzXYo580jc3R234z4="
},
"color-convert": {
"version": "1.9.2",
@@ -874,6 +890,15 @@
"resolved": "https://registry.npmjs.org/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz",
"integrity": "sha1-ED01J/0xUo9AGIEwyEHv3XgmTlw="
},
"ecdsa-sig-formatter": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.10.tgz",
"integrity": "sha1-HFlQAPBKiJffuFAAiSoPTDOvhsM=",
"dev": true,
"requires": {
"safe-buffer": "^5.0.1"
}
},
"ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
@@ -1134,6 +1159,12 @@
"utils-merge": "1.0.1"
}
},
"extend": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
"dev": true
},
"external-editor": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz",
@@ -1271,6 +1302,26 @@
"@sailshq/lodash": "^3.10.2"
}
},
"follow-redirects": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.2.tgz",
"integrity": "sha512-kssLorP/9acIdpQ2udQVTiCS5LQmdEz9mvdIfDcl1gYX2tPKFADHSyFdvJS040XdFsPzemWtgI3q8mFVCxtX8A==",
"dev": true,
"requires": {
"debug": "^3.1.0"
},
"dependencies": {
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"dev": true,
"requires": {
"ms": "2.0.0"
}
}
}
},
"foreach": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz",
@@ -1309,6 +1360,17 @@
"integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=",
"dev": true
},
"gcp-metadata": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-0.6.3.tgz",
"integrity": "sha512-MSmczZctbz91AxCvqp9GHBoZOSbJKAICV7Ow/AIWSJZRrRchUd5NL1b2P4OfP+4m490BEUPhhARfpHdqCxuCvg==",
"dev": true,
"requires": {
"axios": "^0.18.0",
"extend": "^3.0.1",
"retry-axios": "0.3.2"
}
},
"get-stdin": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
@@ -1352,6 +1414,72 @@
"pinkie-promise": "^2.0.0"
}
},
"google-auth-library": {
"version": "1.6.1",
"resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-1.6.1.tgz",
"integrity": "sha512-jYiWC8NA9n9OtQM7ANn0Tk464do9yhKEtaJ72pKcaBiEwn4LwcGYIYOfwtfsSm3aur/ed3tlSxbmg24IAT6gAg==",
"dev": true,
"requires": {
"axios": "^0.18.0",
"gcp-metadata": "^0.6.3",
"gtoken": "^2.3.0",
"jws": "^3.1.5",
"lodash.isstring": "^4.0.1",
"lru-cache": "^4.1.3",
"retry-axios": "^0.3.2"
}
},
"google-p12-pem": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-1.0.2.tgz",
"integrity": "sha512-+EuKr4CLlGsnXx4XIJIVkcKYrsa2xkAmCvxRhX2HsazJzUBAJ35wARGeApHUn4nNfPD03Vl057FskNr20VaCyg==",
"dev": true,
"requires": {
"node-forge": "^0.7.4",
"pify": "^3.0.0"
},
"dependencies": {
"pify": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
"integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
"dev": true
}
}
},
"googleapis": {
"version": "32.0.0",
"resolved": "https://registry.npmjs.org/googleapis/-/googleapis-32.0.0.tgz",
"integrity": "sha512-UUPvQnztLkpkAt8cs2Zw/uVqCGbl9FuJbhqdvWIHr8RX7zrdemPQWkIrW7clyjhSZceHlnMya4U3tuQ4BXSxIQ==",
"dev": true,
"requires": {
"google-auth-library": "^1.4.0",
"pify": "^3.0.0",
"qs": "^6.5.2",
"url-template": "^2.0.8",
"uuid": "^3.2.1"
},
"dependencies": {
"pify": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
"integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
"dev": true
},
"qs": {
"version": "6.5.2",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
"dev": true
},
"uuid": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==",
"dev": true
}
}
},
"graceful-fs": {
"version": "4.1.11",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
@@ -1363,11 +1491,11 @@
"integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU="
},
"grunt": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/grunt/-/grunt-1.0.1.tgz",
"integrity": "sha1-6HeHZOlEsY8yuw8QuQeEdcnftWs=",
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/grunt/-/grunt-1.0.3.tgz",
"integrity": "sha512-/JzmZNPfKorlCrrmxWqQO4JVodO+DVd5XX4DkocL/1WlLlKVLE9+SdEIempOAxDhWPysLle6afvn/hg7Ck2k9g==",
"requires": {
"coffee-script": "~1.10.0",
"coffeescript": "~1.10.0",
"dateformat": "~1.0.12",
"eventemitter2": "~0.4.13",
"exit": "~0.1.1",
@@ -1375,14 +1503,15 @@
"glob": "~7.0.0",
"grunt-cli": "~1.2.0",
"grunt-known-options": "~1.1.0",
"grunt-legacy-log": "~1.0.0",
"grunt-legacy-util": "~1.0.0",
"grunt-legacy-log": "~2.0.0",
"grunt-legacy-util": "~1.1.1",
"iconv-lite": "~0.4.13",
"js-yaml": "~3.5.2",
"minimatch": "~3.0.0",
"minimatch": "~3.0.2",
"mkdirp": "~0.5.1",
"nopt": "~3.0.6",
"path-is-absolute": "~1.0.0",
"rimraf": "~2.2.8"
"rimraf": "~2.6.2"
},
"dependencies": {
"grunt-cli": {
@@ -1395,6 +1524,14 @@
"nopt": "~3.0.6",
"resolve": "~1.1.0"
}
},
"rimraf": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",
"integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==",
"requires": {
"glob": "^7.0.5"
}
}
}
},
@@ -1404,44 +1541,70 @@
"integrity": "sha1-pCdO6zL6dl2lp6OxcSYXzjsUQUk="
},
"grunt-legacy-log": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-1.0.2.tgz",
"integrity": "sha512-WdedTJ/6zCXnI/coaouzqvkI19uwqbcPkdsXiDRKJyB5rOUlOxnCnTVbpeUdEckKVir2uHF3rDBYppj2p6N3+g==",
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-2.0.0.tgz",
"integrity": "sha512-1m3+5QvDYfR1ltr8hjiaiNjddxGdQWcH0rw1iKKiQnF0+xtgTazirSTGu68RchPyh1OBng1bBUjLmX8q9NpoCw==",
"requires": {
"colors": "~1.1.2",
"grunt-legacy-log-utils": "~1.0.0",
"grunt-legacy-log-utils": "~2.0.0",
"hooker": "~0.2.3",
"lodash": "~4.17.5"
}
},
"grunt-legacy-log-utils": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-1.0.0.tgz",
"integrity": "sha1-p7ji0Ps1taUPSvmG/BEnSevJbz0=",
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.0.1.tgz",
"integrity": "sha512-o7uHyO/J+i2tXG8r2bZNlVk20vlIFJ9IEYyHMCQGfWYru8Jv3wTqKZzvV30YW9rWEjq0eP3cflQ1qWojIe9VFA==",
"requires": {
"chalk": "~1.1.1",
"lodash": "~4.3.0"
"chalk": "~2.4.1",
"lodash": "~4.17.10"
},
"dependencies": {
"lodash": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.3.0.tgz",
"integrity": "sha1-79nEpuxT87BUEkKZFcPkgk5NJaQ="
"ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"requires": {
"color-convert": "^1.9.0"
}
},
"chalk": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
"integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
}
},
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
},
"supports-color": {
"version": "5.4.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz",
"integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==",
"requires": {
"has-flag": "^3.0.0"
}
}
}
},
"grunt-legacy-util": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-1.0.0.tgz",
"integrity": "sha1-OGqnjcbtUJhsKxiVcmWxtIq7m4Y=",
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-1.1.1.tgz",
"integrity": "sha512-9zyA29w/fBe6BIfjGENndwoe1Uy31BIXxTH3s8mga0Z5Bz2Sp4UCjkeyv2tI449ymkx3x26B+46FV4fXEddl5A==",
"requires": {
"async": "~1.5.2",
"exit": "~0.1.1",
"getobject": "~0.1.0",
"hooker": "~0.2.3",
"lodash": "~4.3.0",
"underscore.string": "~3.2.3",
"which": "~1.2.1"
"lodash": "~4.17.10",
"underscore.string": "~3.3.4",
"which": "~1.3.0"
},
"dependencies": {
"async": {
@@ -1449,10 +1612,40 @@
"resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
"integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo="
},
"lodash": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.3.0.tgz",
"integrity": "sha1-79nEpuxT87BUEkKZFcPkgk5NJaQ="
"which": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
"requires": {
"isexe": "^2.0.0"
}
}
}
},
"gtoken": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/gtoken/-/gtoken-2.3.0.tgz",
"integrity": "sha512-Jc9/8mV630cZE9FC5tIlJCZNdUjwunvlwOtCz6IDlaiB4Sz68ki29a1+q97sWTnTYroiuF9B135rod9zrQdHLw==",
"dev": true,
"requires": {
"axios": "^0.18.0",
"google-p12-pem": "^1.0.0",
"jws": "^3.1.4",
"mime": "^2.2.0",
"pify": "^3.0.0"
},
"dependencies": {
"mime": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz",
"integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==",
"dev": true
},
"pify": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
"integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
"dev": true
}
}
},
@@ -1687,6 +1880,12 @@
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
"integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0="
},
"is-buffer": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
"dev": true
},
"is-builtin-module": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz",
@@ -1750,6 +1949,12 @@
"resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
"integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI="
},
"is-wsl": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz",
"integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=",
"dev": true
},
"isarray": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
@@ -1800,6 +2005,27 @@
"graceful-fs": "^4.1.6"
}
},
"jwa": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.6.tgz",
"integrity": "sha512-tBO/cf++BUsJkYql/kBbJroKOgHWEigTKBAjjBEmrMGYd1QMBC74Hr4Wo2zCZw6ZrVhlJPvoMrkcOnlWR/DJfw==",
"dev": true,
"requires": {
"buffer-equal-constant-time": "1.0.1",
"ecdsa-sig-formatter": "1.0.10",
"safe-buffer": "^5.0.1"
}
},
"jws": {
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/jws/-/jws-3.1.5.tgz",
"integrity": "sha512-GsCSexFADNQUr8T5HPJvayTjvPIfoyJPtLQBwn5a4WZQchcrPMPMAWcC1AzJVRDKyD6ZPROPAxgv6rfHViO4uQ==",
"dev": true,
"requires": {
"jwa": "^1.1.5",
"safe-buffer": "^5.0.1"
}
},
"klaw": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz",
@@ -2523,6 +2749,12 @@
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz",
"integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk="
},
"node-forge": {
"version": "0.7.5",
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.5.tgz",
"integrity": "sha512-MmbQJ2MTESTjt3Gi/3yG1wGpIMhUfcIypUCGtTizFR9IiccFwxSpfp0vtIZlkFclEqERemxfnSdZEMR9VqqEFQ==",
"dev": true
},
"nopt": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
@@ -2607,6 +2839,15 @@
"resolved": "https://registry.npmjs.org/open/-/open-0.0.5.tgz",
"integrity": "sha1-QsPhjslUZra/DcQvOilFw/DK2Pw="
},
"opn": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/opn/-/opn-5.3.0.tgz",
"integrity": "sha512-bYJHo/LOmoTd+pfiYhfZDnf9zekVJrY+cnS2a5F2x+w5ppvTqObojTP7WiFG+kVZs9Inw+qQ/lw7TroWwhdd2g==",
"dev": true,
"requires": {
"is-wsl": "^1.1.0"
}
},
"optionator": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz",
@@ -3059,6 +3300,12 @@
"signal-exit": "^3.0.2"
}
},
"retry-axios": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/retry-axios/-/retry-axios-0.3.2.tgz",
"integrity": "sha512-jp4YlI0qyDFfXiXGhkCOliBN1G7fRH03Nqy8YdShzGqbY5/9S2x/IR6C88ls2DFkbWuL3ASkP7QD3pVrNpPgwQ==",
"dev": true
},
"revalidator": {
"version": "0.1.8",
"resolved": "https://registry.npmjs.org/revalidator/-/revalidator-0.1.8.tgz",
@@ -4289,11 +4536,6 @@
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
},
"colors": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz",
"integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM="
},
"combined-stream": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz",
@@ -5122,22 +5364,14 @@
"integrity": "sha1-pCdO6zL6dl2lp6OxcSYXzjsUQUk="
},
"grunt-legacy-log": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-1.0.0.tgz",
"integrity": "sha1-+4bxgJhHvAfcR4Q/ns1srLYt8tU=",
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-1.0.2.tgz",
"integrity": "sha512-WdedTJ/6zCXnI/coaouzqvkI19uwqbcPkdsXiDRKJyB5rOUlOxnCnTVbpeUdEckKVir2uHF3rDBYppj2p6N3+g==",
"requires": {
"colors": "~1.1.2",
"grunt-legacy-log-utils": "~1.0.0",
"hooker": "~0.2.3",
"lodash": "~3.10.1",
"underscore.string": "~3.2.3"
},
"dependencies": {
"lodash": {
"version": "3.10.1",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
"integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y="
}
"lodash": "~4.17.5"
}
},
"grunt-legacy-log-utils": {
@@ -6914,6 +7148,12 @@
"send": "0.16.1"
}
},
"server-destroy": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz",
"integrity": "sha1-8Tv5KOQrnD55OD5hzDmYtdFObN0=",
"dev": true
},
"setprototypeof": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.2.tgz",
@@ -7382,9 +7622,13 @@
"integrity": "sha1-YaajIBBiKvoHljvzJSA88SI51gQ="
},
"underscore.string": {
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.2.3.tgz",
"integrity": "sha1-gGmSYzZl1eX8tNsfs6hi62jp5to="
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.4.tgz",
"integrity": "sha1-LCo/n4PmR2L9xF5s6sZRQoZCE9s=",
"requires": {
"sprintf-js": "^1.0.3",
"util-deprecate": "^1.0.2"
}
},
"unpipe": {
"version": "1.0.0",
@@ -7400,11 +7644,16 @@
"punycode": "^2.1.0"
}
},
"url-template": {
"version": "2.0.8",
"resolved": "https://registry.npmjs.org/url-template/-/url-template-2.0.8.tgz",
"integrity": "sha1-/FZaPMy/93MMd19WQflVV5FDnyE=",
"dev": true
},
"util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
"dev": true
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
},
"utile": {
"version": "0.2.1",

View File

@@ -5,18 +5,21 @@
"description": "a Sails application",
"keywords": [],
"dependencies": {
"@sailshq/connect-redis": "^3.2.1",
"@sailshq/lodash": "^3.10.3",
"@sailshq/socket.io-redis": "^5.2.0",
"async": "2.0.1",
"grunt": "^1.0.3",
"sails": "^1.0.2",
"grunt": "1.0.1",
"sails-hook-grunt": "^3.0.2",
"sails-hook-orm": "^2.0.0-16",
"sails-hook-sockets": "^1.4.0",
"@sailshq/connect-redis": "^3.2.1",
"@sailshq/socket.io-redis": "^5.2.0",
"@sailshq/lodash": "^3.10.3",
"async": "2.0.1"
"sails-hook-sockets": "^1.4.0"
},
"devDependencies": {
"@sailshq/eslint": "^4.19.3"
"@sailshq/eslint": "^4.19.3",
"googleapis": "^32.0.0",
"opn": "^5.3.0",
"server-destroy": "^1.0.1"
},
"scripts": {
"start": "NODE_ENV=production node app.js",

View File

@@ -1,2 +1 @@
Yeah!
<a href="<%= url %>" ><img src="/images/signingwithgoogle.png" /> </a>