Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/domain7/just_open_id
just_open_id is a Rails 3 engine for just OpenID logins using OmniAuth.
https://github.com/domain7/just_open_id
Last synced: 1 day ago
JSON representation
just_open_id is a Rails 3 engine for just OpenID logins using OmniAuth.
- Host: GitHub
- URL: https://github.com/domain7/just_open_id
- Owner: domain7
- Created: 2011-04-20T16:34:37.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2011-09-03T22:06:21.000Z (over 13 years ago)
- Last Synced: 2024-12-30T12:45:34.200Z (11 days ago)
- Language: Ruby
- Homepage:
- Size: 101 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
just_open_id is a Rails 3 engine for just OpenID logins using OmniAuth. It connects a OpenID account to a lightweight, locally stored User model.
The goal of this gem is to make it possible to manage accounts across multiple small apps, using as little code as possible in each respective app.
I also want to use a User model and current_user helper method in the most traditional way.
Installation:
gem 'just_open_id'
rails g just_open_idWhat that did:
The generator will create 3 things in your app:
1. User model subclassed to the one in the Rails engine.
2. Migration for that Rails engine User model.
3. config/initializers/just_open_id.rbUsage:
1. Run your migrations for your namespaced User model.
2. Ensure you have a root path.
3. Add something like this to a template.<% if current_user %>
Welcome <%= current_user.name %>!
<%= link_to "Sign Out", signout_path %>
<% else %>
<%= link_to "Sign in with OpenID", "/auth/open_id" %>
<% end %>'If you like, you can change your openid_url in:
config/initializers/just_open_id.rbNotes:
If you are looking for the route that maps "/auth/open_id", it is hard to find. It is comes as part of omniauth and does not show up in `rake routes`.
Filters:
You get the following filters for controllers:
-require_user
-current_userHeroku:
This works on Heroku, but it is using the ./tmp dir.