mirror of
				https://github.com/mmumshad/ansible-playable.git
				synced 2025-03-09 23:38:54 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
	
		
			473 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			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;
 |