clintandrewhall/node-foursquare

Node can't access #access_token=X on foursquare redirect

Closed this issue · 4 comments

When foursquare redirects authenticated users, it appends the token via a fragment. Ideally, I'd like to do some processing on the server when that redirect hits. It appears, however, that NodeJS ignores the #access_token=XXXX completely, and does not make that information available on the request. I can fix this using the client as a proxy and make yet another request, which feels hacky and adds latency.

Just wondering if anyone has encountered this issue, and how it could be address using node-foursquare.

This is interesting... is it a NodeJS problem specifically? I'm not familiar with this issue.

I just ran my unit tests and everything is fine... can you detail a test case?

When you get a chance, set up a test application and create a test config for the unit tests. When I run the authenticated unit test suite, it doesn't append as a fragment, but rather as a parameter (token=xxx). Let me know what may be happening here, I'm a bit perplexed... :-P Cheers!

Clint - After some research, I figured out that this isn't a node-foursquare thing. It's a node thing... fragments are ignored by the node server. However it isn't a problem as the expectation is to access #access_token on the client side, which I'm now doing and it works. You may close this issue.