Plugins - acts_as_google_account

StarAdd to favorites

A plugin for authenticating users objects against the Google Authentication API.

Example

class User < ActiveRecord::Base

  acts_as_google_account

  def self.login(username, password)
    if username.include? "@gmail.com" then
        if self.GoogleLogin(username, password) then
            find_by_email(username)
        end
    else
        hashed_password = hash_password(password || "")
        find(:first, :conditions  => ["username = ? and hashed_password = ?", username, hashed_password])
    end
  end

  def try_to_login
    User.login(self.username, self.password)
  end
end

Fidel Santiago

http://rubyforge.org/projects/asgoogleaccount/

svn://rubyforge.org/var/svn/asgoogleaccount

GPL

  • Currently 3.2/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Security

Tags

Comments

Add a comment
ravi 5 Oct 2007

hi, i have used your code but i got error like undefined method actsas_googleaccount. please suggest on this error

Ravi 5 Oct 2007

Hi, i have followed your code to login into my web application with google id and password but i didnt get.please provide controller code with explanation and step wise

Blaine 30 Oct 2006

This plugin is not recommended - it does not auth against gauth in a secure fashion, and runs contrary to google's policy of not storing google logins on foreign sites. It will make your logins slow, besides.

Search Plugins

Query syntax

Plugins by Category

Sponsors

Rails Kits: Get Code. Get Moving.

Have a comment?