mirror of
https://github.com/mmumshad/ansible-playable.git
synced 2025-02-24 07:14:14 +00:00
24 lines
473 B
JavaScript
24 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;
|