Skip to content

DavidChristiansen/World-Domination.Web.Authentication

 
 

Repository files navigation

WTF

Not impressed

I just don't get it

Angry

Forever code alone

Insane programmer

Success Programmer

A .NET package for using Facebook, Google or Twitter to Authenticate your Users

I'm blond. I'm dumb. But I program.

So I want a damn simple way to authenticate with Facebook, Twitter or wherever.

I DON'T CARE IF IT'S OAUTH OR OPENID OR O-GO-SCREW-YOURSELF.

I just want to do

  1. Send me off to Facebook, Google or Twitter.
  2. Come back to my site and the site now has whatever user data they handed over.

That's It.

  • No dabasase crap.
  • No Session stuff.
  • No over-generic-crazy one-solution-fits-every-provider-on-the-interwebs.

So install this bad boy :

Yes! Install this package!!

Code or GTFO

Here's the main code that does what we want (excluding error checking, etc, for brevity).

public RedirectResult RedirectToAuthenticate(string providerKey)
{
    var uri = _authenticationService.RedirectToAuthenticationProvider(providerKey);
    return Redirect(uri.AbsoluteUri);
}

public ActionResult AuthenticateCallback(string providerKey)
{
    var model = new AuthenticateCallbackViewModel();
    model.AuthenticatedClient = _authenticationService.CheckCallback(providerKey, Request.Params);
    return View(model);
}

Ok. You had me at Bad Luck Brian. Now what?

  1. Read the sample code pages in the project's Wiki - take 1 minute to grok.
  2. Install nuget pacakge.
  3. Win.

Play it forward

Don't be scared to fork and then make some pull requests. I ❤️ pull requests!

Then this simple library can actually be really helpful to more than 1 person (le moi) on this rock called Earth.

Disclaimer

No blonds or Unicorns were harmed in the coding of this library.

Pew Pew

About

Some simple ASP.NET MVC Web Authentication titty-sparkles.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 99.9%
  • Puppet 0.1%