Ruby on Rails Advent Calendar 21日目の記事です。 DeviseとOmniauthを使って認証管理をしてみます。 Deviseとは何か Devise is a flexible authentication solution for Rails based on Warden. It: - Is Rack based; - Is a complete MVC solution based on Rails engines; - Allows you to have multiple models signed in at the same time; - Is based on a modularity concept: use just what you really need. とGithubにあるように、 WardenをベースとしたRails向けフレキシ
TwitterのOAuth認証を使うようなアプリってド定番なのに、時間が空くと、ワリと忘れちゃって時間をロスするので手順化しておこうと思う。 なお、usersとauthenticationsにユーザ情報を分けてるのは、Facebook認証とか追加するとき用、usersがauthenticationsが1対nになる。 [環境] Mac OSX 10.6.8 ruby 1.8.7 rails 3.0.6 [参考] http://blog.twiwt.org/e/14b25f http://taksatou.blogspot.com/2011/03/twitterfacebookrails.html http://taksatou.blogspot.com/2011/03/twitterfacebookoauthrailsomniauth.html ・Gemfileに追加 gem 'devise
I'm trying to implement facebook authentication in my app following this guide I've followed all the steps but get the following error after hitting login. Unknown action The action 'facebook' could not be found for Devise::OmniauthCallbacksController I've created the file omniauth_callbacks_controller in controllers/users. It has a facebook method defined. Any idea how I should debug? Adding my r
production: &production facebook: key: xxxxxxxxxxx secret: XXXXXXXXXXXXXXXXXXXXXXXXX github: key: xxxxxxxxxxx secret: XXXXXXXXXXXXXXXXXXXXXXXXX google: key: xxxxxxxxxxx secret: XXXXXXXXXXXXXXXXXXXXXXXXX hatena: key: xxxxxxxxxxx secret: XXXXXXXXXXXXXXXXXXXXXXXXX linkedin: key: xxxxxxxxxxx secret: XXXXXXXXXXXXXXXXXXXXXXXXX mixi: key: xxxxxxxxxxx secret: XXXXXXXXXXXXXXXXXXXXXXXXX twitter: key: xxxxxx
01. Gemfile �]_дU gem 'pg' group :development do gem 'ruby-debug' end gem 'rake', '~> 0.8.7' gem 'devise' gem 'oa-oauth', :require => 'omniauth/oauth' gem 'omniauth' gem 'haml' gem 'dynamic_form' gem 'sass' gem 'jquery-rails' gem 'cancan' gem 'uuidtools' 02. Generate migration and add authorization model оBϴU ��7ϴU rails generate devise:install rails generate devise user rails g migration add_name
There are quite a few OAuth solutions out there, but I want to share the one we use since it allows you to intelligently link multiple OAuth identities with a single user entity. If you use 90% of the code examples on the Internet you will wind up with a new user entity each time the user signs in with a different OAuth provider, and a bunch of very confused users. The OAuth provider that throws a
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く