I'm trying to implement a google sign in system into my Angular site. I believe I have gone through the configuration process correctly, as Google's login page redirects to localhost/callback just like I told it to. Here is my controller code:
.controller('LoginCtrl', ['$scope', function($scope) {
var clientid = "client id from developer console";
var redirect = "http://localhost/callback";
var scope = "profile%20email";
var prompt = "select_account";
var req = window.open('https://accounts.google.com/o/oauth2/v2/auth?client_id='+
clientid+'&response_type=code&redirect_uri='+redirect+'&scope='+scope+
'&prompt='+prompt);
}])
Without enabling html5 mode, I don't know how to make my application respond to a request to localhost/callback, only localhost/#/callback, but in the Google Developer Console I can't put the "#" symbol into a redirect URI.
Is there some way to make angular respond to a request without /#/ without putting the application into html5 mode? Alternatively, is there some way to make localhost/#/callback a valid redirect URI in the Google Developer Console?