Code Monkey home page Code Monkey logo

muck-auth's Introduction

muck-auth

This gem wraps the omniauth gem to make it simple to authenticate with multiple services.

Installation

Add muck-auth to your Gemfile:

gem 'muck-auth'

After installing muck-auth be sure to sync the gem:

rake muck:sync:auth

or to sync everything from the muck framework:

rake muck:sync

Configuration

Add services by including the proper credentials in secrets.yml:

auth_credentials:
  twitter: # Twitter api access: http://www.twitter.com/apps 
    key: '{get a key}'
    secret: '{it comes with a secret}'
    valid_signin: true   # include if you want to use this service to let your users signin/register for your site

OAuth Services

Here’s a list of common oauth services. For a complete list of all available services please consult the omniauth documentation as the available services are constantly changing: github.com/intridea/omniauth

Twitter:    http://www.twitter.com/apps 
Google:     http://code.google.com/apis/accounts/docs/RegistrationForWebAppsAuto.html#register  (domains are managed on: https://www.google.com/accounts/ManageDomains)
Yahoo:      http://developer.yahoo.com/flickr/
Flick:      http://www.flickr.com/services/apps/create/apply
Linked In:  https://www.linkedin.com/secure/developer
Friendfeed: https://friendfeed.com/account/login?next=%2Fapi%2Fregister

Usage

Render a full list of all services with links to authorize the service and icons:

<%= render :partial => 'authentications/available_services', :locals => { :include_icons => true } %>

Render a list of all services that the current_user has authorized:

<%= render :partial => 'authentications/current_services', :locals => { :include_icons => true, :authentications => current_user.authentications } %>

Let users sign in and/or register on your site via oauth. Just remember to set valid_signin to true in your secrets.yml file:

<%= render :partial => 'users/signup_services' %>

There is a default template (‘authentications/signup’) that will be rendered if the sign up fails. Override that template if you want to provide the user with a custom experience:

Copyright © 2009-2011 Tatemae.com. See LICENSE for details.

muck-auth's People

Contributors

jbasdf avatar

Stargazers

 avatar Joel Duffin avatar  avatar

Watchers

 avatar Joel Duffin avatar  avatar James Cloos 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.