atmos/warden-github — pull request #18 by fphilipe (2013-01-30 16:24:22+00:00)
Title: Improve strategy and fix redirect

Hey @atmos, me again.

I made some improvements to the strategy. Here's what's changed:

- elaborated example app
- redirecting to original url now works
- use original path as callback when no default is set (easier to setup, no messing with routes)
- clean up session after authentication

One nice thing is that there should be no clashes with params when GitHub redirects back to the app. E.g. when you open `http://localhost:9292/profile?code=abc&state=123` which looks like a callback, it will not be recognized as the callback but instead will redirect to GitHub, which redirects back to `http://localhost:9292/profile?code=&state=`, which in turn redirects back to the original url `http://localhost:9292/profile?code=abc&state=123`.

Let me know what you think.