1
0
Fork 0
mirror of https://github.com/mmumshad/ansible-playable.git synced 2025-02-15 04:42:05 +00:00
ansible-playable/server/auth/google/index.js
Mumshad Mannambeth c92f737237 Initial Commit
2017-06-07 13:36:45 -04:00

23 lines
473 B
JavaScript

'use strict';
import express from 'express';
import passport from 'passport';
import {setTokenCookie} from '../auth.service';
var router = express.Router();
router
.get('/', passport.authenticate('google', {
failureRedirect: '/signup',
scope: [
'profile',
'email'
],
session: false
}))
.get('/callback', passport.authenticate('google', {
failureRedirect: '/signup',
session: false
}), setTokenCookie);
export default router;