Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
Merge pull request #568 from floydpink/feature-fix-535
Browse files Browse the repository at this point in the history
Fix the Google OAuth Redirect Bug - #535
  • Loading branch information
lirantal committed Jul 29, 2015
2 parents 88a89f2 + 7c015e2 commit 3bc1de2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion public/application.js
Expand Up @@ -15,6 +15,13 @@ angular.element(document).ready(function() {
//Fixing facebook bug with redirect
if (window.location.hash === '#_=_') window.location.hash = '#!';

// Fixing google bug with redirect
if (window.location.href[window.location.href.length - 1] === '#' &&
// for just the error url (origin + /#)
(window.location.href.length - window.location.origin.length) === 2) {
window.location.href = window.location.origin + '/#!';
}

//Then init the app
angular.bootstrap(document, [ApplicationConfiguration.applicationModuleName]);
});
});

0 comments on commit 3bc1de2

Please sign in to comment.