Coder Social home page Coder Social logo

phillip-haydon / simpleauthentication Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simpleauthentication/simpleauthentication

0.0 2.0 0.0 5.24 MB

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

License: MIT License

C# 99.81% Shell 0.19%

simpleauthentication's Introduction

SimpleAuthentication - making authentication ... simple

-- SimpleAuthentication is a ASP.NET library that makes it really simple to for developers to add Social Authentication code to an ASP.NET application.

Sample Login Buttons

Out of the box, it offers Facebook, Google, Twitter and Microsoft Live integration for either ASP.NET MVC or NancyFX applications.

There's also some less used authentication providers like GitHub or Amazon supplied but anyone can take advantage of the api and create your own provider extension. There are plenty of defaults in place (such as Routes, etc) but most things are available to adjust if you want to do advanced stuff.

Developer friendly!

Take advantage of the Glimpse plugin so you can see what magic is happening under the hood if you need to debug a problem or just want to see what happens :)

Glimpse plugin


The library only deals with authentication - once we give you the user details for the person logging in, you can whatever you want with that (such as, create a new user or update an existing user). We do not attempt to insert data into a particular type of database or make any other assumptions about what you do with user data.

The "How simple is this?" example

Adding a 'Log in with Facebook' to an existing ASP.NET MVC web application.

Quick summary

  • Create a Login button on some View.
  • Create a class which will have all the User data once they have authenticated
  • Add your provider keys to the .config file

Simple steps

  1. Find the View you wish to modify.
  2. Add the Button or hyper link that will be used to kick start the authentication process.
  3. Set the button route to be /authentication/authenticate/fakefacebook
  4. Now we grab the library -> install-package SimpleAuthentication.Mvc
  5. Create a class which will be called -after- we come back from Facebook (or any provider). We have to do something with that user data, right? public class HandleCallback(); A good example of what people do here is: save user to database then redirect to homepage or where they were originally referred from.
  6. Wire up the new class with our ServiceLocator / Di-IoC so the SimpleAuthentication code knows what to do when it's finished.
  7. Build and run the site :)

Once this works.

  1. Goto developer.facebook.com and create an application. This will give you a Client Key and Secret Key.
  2. Enter the Client and Secret key to the web.config, <providers> section.
  3. Change the button route to /authentication/authenticate/facebook <-- notice we've removed the fake prepended text? :)

Done.

You had me at Simple ... what now?

  • Detailed guide to adding SimpleAuthentication to an ASP.NET MVC or NancyFx web application.
  • Detailed Guide to using the Extra Providers to a web application.
  • Detailed guide to using the Glimpse Plugin.
  • How to create your own provider.

And Finally ...

  • Still having problems? We hang out in JabbR so you can ask questions in there :)
  • We accept Pull Requests.
  • Please use the GitHub issues for any other problems.
  • License : MIT
  • No Unicorns were harmed in the coding of this library.

simpleauthentication's People

Contributors

purekrome avatar phillip-haydon avatar fjeldstad avatar seguemark avatar privatejson avatar archomeda avatar buildstarted avatar jchannon avatar khalidabuhakmeh avatar kijanawoodard avatar pmbanugo avatar codeprogression avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.