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

Commit

Permalink
Correct the issue of Google OAuth2 redirect missing the hashbang afte…
Browse files Browse the repository at this point in the history
…r enabling GooglePlus API - Fixes #535
  • Loading branch information
floydpink committed May 20, 2015
1 parent 88a89f2 commit 7c015e2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion public/application.js
Original file line number Diff line number Diff line change
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 7c015e2

Please sign in to comment.