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.