From 7c015e27ad7a60d8a2d5f9b35a3a0710b6ae3945 Mon Sep 17 00:00:00 2001 From: Hari Menon Date: Tue, 19 May 2015 23:08:13 -0400 Subject: [PATCH] Correct the issue of Google OAuth2 redirect missing the hashbang after enabling GooglePlus API - Fixes #535 --- public/application.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/public/application.js b/public/application.js index 19bb411ef2..7aaf1c5df4 100644 --- a/public/application.js +++ b/public/application.js @@ -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]); -}); \ No newline at end of file +});