1

I'm trying to get the open authentication for google working in my application. Using information found in the comments of this answer: https://stackoverflow.com/a/23094155/526704

So I added this route to the top of my RegisterRoutes method:

routes.MapRoute(
    name: "signin-google",
    url: "signin-google",
    defaults: new { controller = "Account", action = "ExternalLoginCallback"}
);

Before doing this, navigating to localhost:port/signin-google gave me a 404, but now it just gives me an empty page. When I navigate directly to /Account/ExternalLoginCallback, it sees it wasn't given any login data, so it returns me to the login page (per the logic in the controller). When I put a breakpoint at the top of the ExternalLoginCallback method, it fires when I navigate to it directly, but not when I load /signin-google.

Why is the route returning an empty page?

Community
  • 1
  • 1
DLeh
  • 23,806
  • 16
  • 84
  • 128

1 Answers1

0

There must be some sort of built-in route for /google-signin. I didn't solve this exact issue, but I was able to get Google OAUTH working with information from this link:

http://www.asp.net/mvc/tutorials/mvc-5/create-an-aspnet-mvc-5-app-with-facebook-and-google-oauth2-and-openid-sign-on

DLeh
  • 23,806
  • 16
  • 84
  • 128
  • WHICH part of that helped? That's like saying you read something from a book that helped you. Which part of that 500 page book was it? – Pangamma Mar 27 '18 at 06:52
  • @Pangamma totally depends which part of the 500 page book you are struggling with. 90% of that page is screenshots, I'm sure you can handle it. Try searching for "OAUTH" on the page and you just might find something related to google oauth. – DLeh Mar 27 '18 at 14:18
  • tbh, I already followed that entire tutorial previously. It helped me get to where I am now. Everything works on local, it's just when I navigate to the signin link when deployed to server, it tells me the route isn't found.Sorry for yelling in text form last night btw. You know how late night devving can be. lol. I was yelling at my code more than at you. – Pangamma Mar 27 '18 at 16:17