Merge branch 'thierry' of ssh://git.marbelium.com:10023/Viiciouss/Sup_File into anis
This commit is contained in:
commit
cb0543d590
@ -8,11 +8,7 @@ var User = require('../models/user');
|
||||
passport.use(new FacebookStrategy({
|
||||
clientID: "191092458179642",
|
||||
clientSecret: "964e490d7e49a13ee7a77c9b65419fb3",
|
||||
<<<<<<< HEAD
|
||||
callbackURL: "http://127.0.0.1:3000/api/facebook/callback"
|
||||
=======
|
||||
callbackURL: "https://localhost:3000/api/facebook/callback"
|
||||
>>>>>>> 98b837065bd51764d8da85c7972979c9fcf214dc
|
||||
},
|
||||
function(accessToken, refreshToken, profile, done) {
|
||||
console.log('yaaauuu : ' + accessToken + ' ----- ' + profile.displayName + ' ----- ' + profile.id);
|
||||
@ -38,9 +34,4 @@ passport.use(new FacebookStrategy({
|
||||
});*/
|
||||
}
|
||||
));
|
||||
<<<<<<< HEAD
|
||||
module.exports = passport;
|
||||
=======
|
||||
|
||||
module.exports = passport;
|
||||
>>>>>>> 98b837065bd51764d8da85c7972979c9fcf214dc
|
||||
|
@ -591,7 +591,7 @@ module.exports = "body {\r\n padding-top: 40px;\r\n padding-bottom: 40px;\r\n
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = "<div class=\"container\">\r\n <form class=\"form-signin\" (ngSubmit)=\"login()\" #loginForm=\"ngForm\">\r\n <div class=\"alert alert-warning alert-dismissible\" role=\"alert\" *ngIf=\"message !== ''\">\r\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\"><span aria-hidden=\"true\">×</span></button>\r\n {{message}}\r\n </div>\r\n <h2 class=\"form-signin-heading\">Please sign in</h2>\r\n <label for=\"inputEmail\" class=\"sr-only\">Email address</label>\r\n <input type=\"email\" class=\"form-control\" placeholder=\"Email address\" [(ngModel)]=\"loginData.username\" name=\"username\" required/>\r\n <label for=\"inputPassword\" class=\"sr-only\">Password</label>\r\n <input type=\"password\" class=\"form-control\" placeholder=\"Password\" [(ngModel)]=\"loginData.password\" name=\"password\" required/>\r\n <button class=\"btn btn-lg btn-primary btn-block\" type=\"submit\" [disabled]=\"!loginForm.form.valid\">Sign in</button>\r\n <p>\r\n Not a member? <a [routerLink]=\"['/signup']\">Signup here</a>\r\n </p>\r\n </form>\r\n</div>\r\n\r\n\r\n\r\n<button onclick=\"location.href='/api/facebook'\" type=\"button\" class=\"btn-floating btn-fb\"><i class=\"fa fa-facebook\"></i></button>\r\n<button onclick=\"location.href='/api/github'\" type=\"button\" class=\"btn-floating btn-git\"><i class=\"fa fa-github\"></i></button>\r\n<button onclick=\"location.href='/api/google'\" type=\"button\" class=\"btn-floating btn-gplus\"><i class=\"fa fa-google\"></i></button>\r\n<button type=\"button\" class=\"btn-floating btn-fb\" (click)=\"facebook()\"><i class=\"fa fa-facebook\"></i></button>\r\n"
|
||||
module.exports = "<div class=\"container\">\r\n <form class=\"form-signin\" (ngSubmit)=\"login()\" #loginForm=\"ngForm\">\r\n <div class=\"alert alert-warning alert-dismissible\" role=\"alert\" *ngIf=\"message !== ''\">\r\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\"><span aria-hidden=\"true\">×</span></button>\r\n {{message}}\r\n </div>\r\n <h2 class=\"form-signin-heading\">Please sign in</h2>\r\n <label for=\"inputEmail\" class=\"sr-only\">Email address</label>\r\n <input type=\"email\" class=\"form-control\" placeholder=\"Email address\" [(ngModel)]=\"loginData.username\" name=\"username\" required/>\r\n <label for=\"inputPassword\" class=\"sr-only\">Password</label>\r\n <input type=\"password\" class=\"form-control\" placeholder=\"Password\" [(ngModel)]=\"loginData.password\" name=\"password\" required/>\r\n <button class=\"btn btn-lg btn-primary btn-block\" type=\"submit\" [disabled]=\"!loginForm.form.valid\">Sign in</button>\r\n <p>\r\n Not a member? <a [routerLink]=\"['/signup']\">Signup here</a>\r\n </p>\r\n\r\n <button onclick=\"location.href='/api/facebook'\" type=\"button\" class=\"btn-floating btn-fb\"><i class=\"fa fa-facebook\"></i></button>\r\n <button onclick=\"location.href='/api/github'\" type=\"button\" class=\"btn-floating btn-git\"><i class=\"fa fa-github\"></i></button>\r\n <button onclick=\"location.href='/api/google'\" type=\"button\" class=\"btn-floating btn-gplus\"><i class=\"fa fa-google\"></i></button>\r\n </form>\r\n</div>\r\n<<<<<<< HEAD\r\n\r\n\r\n\r\n<button onclick=\"location.href='/api/facebook'\" type=\"button\" class=\"btn-floating btn-fb\"><i class=\"fa fa-facebook\"></i></button>\r\n<button onclick=\"location.href='/api/github'\" type=\"button\" class=\"btn-floating btn-git\"><i class=\"fa fa-github\"></i></button>\r\n<button onclick=\"location.href='/api/google'\" type=\"button\" class=\"btn-floating btn-gplus\"><i class=\"fa fa-google\"></i></button>\r\n<button type=\"button\" class=\"btn-floating btn-fb\" (click)=\"facebook()\"><i class=\"fa fa-facebook\"></i></button>\r\n=======\r\n>>>>>>> 98b837065bd51764d8da85c7972979c9fcf214dc\r\n"
|
||||
|
||||
/***/ }),
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -39,10 +39,7 @@
|
||||
"express": "^4.16.2",
|
||||
"express-fileupload": "^0.4.0",
|
||||
"express-session": "^1.15.6",
|
||||
<<<<<<< HEAD
|
||||
"find-or-create": "^1.1.0",
|
||||
=======
|
||||
>>>>>>> 98b837065bd51764d8da85c7972979c9fcf214dc
|
||||
"font-awesome": "4.7.x",
|
||||
"form-data": "^2.3.2",
|
||||
"gulp": "^3.9.1",
|
||||
|
@ -18,13 +18,10 @@ var passportFacebook = require('../auth/facebook');
|
||||
var passportGoogle = require('../auth/google');
|
||||
var passportGitHub = require('../auth/github');
|
||||
|
||||
<<<<<<< HEAD
|
||||
//var router = express.Router([options]);
|
||||
|
||||
|
||||
|
||||
=======
|
||||
>>>>>>> 98b837065bd51764d8da85c7972979c9fcf214dc
|
||||
/* creation Token */
|
||||
getToken = function (headers) {
|
||||
if (headers && headers.authorization) {
|
||||
@ -293,20 +290,15 @@ function ensureAuthenticated(req, res, next) {
|
||||
/* FACEBOOK ROUTER */
|
||||
router.get('/facebook', passportFacebook.authenticate('facebook'));
|
||||
|
||||
<<<<<<< HEAD
|
||||
|
||||
///////////////////
|
||||
router.get('/facebook/callback',
|
||||
passportFacebook.authenticate('facebook', { failureRedirect: 'api/' }),
|
||||
function(req, res) {
|
||||
console.log('faceeeeboookk !!');
|
||||
=======
|
||||
router.get('/facebook/callback', passportFacebook.authenticate('facebook', { successRedirect : '/', failureRedirect: '/login' }), function(req, res) {
|
||||
>>>>>>> 98b837065bd51764d8da85c7972979c9fcf214dc
|
||||
// Successful authentication, redirect home.
|
||||
res.redirect('/api/main');
|
||||
});
|
||||
<<<<<<< HEAD
|
||||
// router.get('/facebook/callback/:id', passport.authenticate('facebook'), function(req, res, err, user, info){
|
||||
// console.log('faceeeeboookk !!');
|
||||
//
|
||||
@ -356,49 +348,27 @@ router.get('/facebook/callback', passportFacebook.authenticate('facebook', { suc
|
||||
// router.get('/facebook',
|
||||
// passportFacebook.authenticate('facebook', { scope: ['read_stream', 'publish_actions'] })
|
||||
// );
|
||||
=======
|
||||
router.get('/facebook',
|
||||
passport.authenticate('facebook', { scope: ['read_stream', 'publish_actions'] })
|
||||
);
|
||||
>>>>>>> 98b837065bd51764d8da85c7972979c9fcf214dc
|
||||
|
||||
/* GOOGLE ROUTER */
|
||||
router.get('/google', passportGoogle.authenticate('google', { scope: 'https://www.google.com/m8/feeds' }));
|
||||
|
||||
router.get('/google/callback', passportGoogle.authenticate('google', { successRedirect : '/', failureRedirect: '/login' }), function(req, res) {
|
||||
<<<<<<< HEAD
|
||||
res.redirect('/');
|
||||
});
|
||||
router.get('/google',
|
||||
passport.authenticate('google', { scope: ['read_stream', 'publish_actions'] })
|
||||
);
|
||||
=======
|
||||
res.redirect('/');
|
||||
});
|
||||
router.get('/google',
|
||||
passport.authenticate('google', { scope: ['read_stream', 'publish_actions'] })
|
||||
);
|
||||
>>>>>>> 98b837065bd51764d8da85c7972979c9fcf214dc
|
||||
|
||||
/* GITHUB ROUTER */
|
||||
router.get('/github', passportGitHub.authenticate('github', { scope: [ 'user:email' ] }));
|
||||
|
||||
router.get('/auth/github/callback', passportGitHub.authenticate('github', { successRedirect : '/', failureRedirect: '/login' }), function(req, res) {
|
||||
<<<<<<< HEAD
|
||||
// Successful authentication, redirect home.
|
||||
res.redirect('/');
|
||||
});
|
||||
router.get('/github',
|
||||
passport.authenticate('github', { scope: ['read_stream', 'publish_actions'] })
|
||||
);
|
||||
=======
|
||||
// Successful authentication, redirect home.
|
||||
res.redirect('/');
|
||||
});
|
||||
router.get('/github',
|
||||
passport.authenticate('github', { scope: ['read_stream', 'publish_actions'] })
|
||||
);
|
||||
>>>>>>> 98b837065bd51764d8da85c7972979c9fcf214dc
|
||||
|
||||
|
||||
module.exports = router;
|
||||
|
@ -13,13 +13,8 @@
|
||||
<p>
|
||||
Not a member? <a [routerLink]="['/signup']">Signup here</a>
|
||||
</p>
|
||||
|
||||
<button onclick="location.href='/api/facebook'" type="button" class="btn-floating btn-fb"><i class="fa fa-facebook"></i></button>
|
||||
<button onclick="location.href='/api/github'" type="button" class="btn-floating btn-git"><i class="fa fa-github"></i></button>
|
||||
<button onclick="location.href='/api/google'" type="button" class="btn-floating btn-gplus"><i class="fa fa-google"></i></button>
|
||||
</form>
|
||||
</div>
|
||||
<<<<<<< HEAD
|
||||
|
||||
|
||||
|
||||
@ -27,5 +22,3 @@
|
||||
<button onclick="location.href='/api/github'" type="button" class="btn-floating btn-git"><i class="fa fa-github"></i></button>
|
||||
<button onclick="location.href='/api/google'" type="button" class="btn-floating btn-gplus"><i class="fa fa-google"></i></button>
|
||||
<button type="button" class="btn-floating btn-fb" (click)="facebook()"><i class="fa fa-facebook"></i></button>
|
||||
=======
|
||||
>>>>>>> 98b837065bd51764d8da85c7972979c9fcf214dc
|
||||
|
Loading…
Reference in New Issue
Block a user