I've set up functionality to "Log in with Github" using Oauth, as described in this tutorial. It's working great, but I can't figure out how to give them a button to log out.
I've tried providing a button imitating Github's logout form (sending a POST request to https://github.com/logout) but it gives the user a Github error page with a Status code: 422 Unprocessable Entity.
I'm using Octokit.rb with Sinatra. Any thoughts?