Skip to content

Instantly share code, notes, and snippets.

@michaelgiles
Created October 22, 2014 23:37
Show Gist options
  • Save michaelgiles/885ce5f53933bb89d778 to your computer and use it in GitHub Desktop.
Save michaelgiles/885ce5f53933bb89d778 to your computer and use it in GitHub Desktop.
Email verification for Google
// Get email/domain
var email = r.email;
var domain = email.replace(/.*@/, "");
var result = domain.toLowerCase();
// If using 72 email
if (result === '72andsunny.com' ){
// console.log('72 email verified');
// Begin loading data here.
App.checkData();
$('#signin-container').fadeOut(500, function(){
App.appRouter.navigate('/', {trigger:true});
});
} else {
// not using 72 email
App.appRouter.navigate('login', {trigger:true});
alert('You cannot access this site');
hello('google').logout()
window.location.replace('http://www.72andsunny.com');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment