Created
October 22, 2014 23:37
-
-
Save michaelgiles/885ce5f53933bb89d778 to your computer and use it in GitHub Desktop.
Email verification for Google
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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