Download pool/shard002/JavaScript/0012738_auth.js from Variable-role/sajaniemi_variable_dataset_large: direct link, hf CLI and curl.
- Browser
- Download file 1.16 kB
-
https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard002/JavaScript/0012738_auth.js
- Command line
-
hf download hf://datasets/Variable-role/sajaniemi_variable_dataset_large/pool/shard002/JavaScript/0012738_auth.js
-
curl -L -o 0012738_auth.js https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard002/JavaScript/0012738_auth.js
1.16 kB
| module.exports = function(passport) { | |
| // POST Login Authenticate | |
| var postLogin = passport.authenticate('signin', { | |
| successRedirect: '/home', | |
| failureRedirect: '/', | |
| failureFlash : true | |
| }); | |
| // POST Registration Authenticate | |
| var postSignup = passport.authenticate('signup', { | |
| successRedirect: '/', | |
| failureRedirect: '/register', | |
| failureFlash : true | |
| }); | |
| // GET Facebook Login Authenticate & Callback | |
| var getFacebookAuth = passport.authenticate('facebook', { scope: 'email' }); | |
| var getFacebookCallback = passport.authenticate('facebook', { | |
| successRedirect: '/home', | |
| failureRedirect: '/', | |
| failureFlash: true | |
| }); | |
| // GET Google Login Authenticate & Callback | |
| var getGoogleAuth = passport.authenticate('google', { scope: ['profile','email'] }); | |
| var getGoogleCallback = passport.authenticate('google', { | |
| successRedirect: '/home', | |
| failureRedirect: '/', | |
| failureFlash: true | |
| }); | |
| return { | |
| postLogin: postLogin, | |
| postSignup: postSignup, | |
| getFacebookAuth: getFacebookAuth, | |
| getFacebookCallback: getFacebookCallback, | |
| getGoogleAuth: getGoogleAuth, | |
| getGoogleCallback: getGoogleCallback | |
| }; | |
| }; | |