stefanbuck / sails-social-auth-example

Sails.js Social Auth example with Passport and MongoDB
243 stars 62 forks source link

auth/google/callback never gets called #10

Closed bastiankistner closed 10 years ago

bastiankistner commented 10 years ago

I was playing around with your great example and tried to extend / customize especially the callback route that is defined for the google passport strategy. But it seems that the route never gets called.

So I debugged it and found out, that the starting route "google" is called twice. Once for the initial request and also for the callback from google. The request object also tells me that the url in the second call is "xyz/auth/google/callback?code123..." which should be routed to the "google/callback" action I hoped.

Am I missing something? Is the callback action working for you or have there been some changes in sails.js since you tested last time?

However your example is working perfectly fine and I've just started with sails.js - but it's very confusing that the callback route (or lets call it sub-action-route) never gets activated.

Best, Bastian

stefanbuck commented 10 years ago

You are right. The route google/callback is never called. The reason for that is the route google. This route catch all routes with google/*. So i removed the callback routes and everything is still working. Thank you for the hint.