Skip to content

Instantly share code, notes, and snippets.

@Maarten88
Maarten88 / AccountController.ExternalLoginCallback.cs
Last active December 18, 2015 09:29
Amazon OAuth2 Client for DotNetOpenAuth
...
//
// GET: /Account/ExternalLoginCallback
[AllowAnonymous]
public ActionResult ExternalLoginCallback(string returnUrl)
{
// Hack around DotNetOpenAuth and OAuth providers using the returnUrl for things that are in the state parameter (Amazon, Google)
// Our provider passed the querystring part of the replay address into the state field
// On return we parse that state parameter and put the arguments back where DotNetOpenAuth expects them, than redirect back to ourselves
if (!String.IsNullOrEmpty(Request.QueryString["state"]))
@unruthless
unruthless / CSS for <sup> and <sub>
Created May 26, 2010 01:31
CSS for <sub> and <sup>
sub, sup {
/* Specified in % so that the sup/sup is the
right size relative to the surrounding text */
font-size: 75%;
/* Zero out the line-height so that it doesn't
interfere with the positioning that follows */
line-height: 0;
/* Where the magic happens: makes all browsers position