Project

rpx_regexp

0.0
No commit activity in last 3 years
No release in over 3 years
Restrict who authenticates through Janrain with a regexp
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

RPX_Regexp

Whenever we want to authenticate users on a Rails app, we like to go with Janrain + Devise.

To achieve this we use this excelent gem that just makes everything very easy.

Sometimes we like to do our own apps where only users in our domain have access, and we use this gem to make sure Janrain and Devise only authenticates our users.

Usage

Add the gem to your Gemfile or require it depending on what you are using.

Then, just set your email RegExp somewhere on your code:

RPXNow.email_regexp = /@crowdint.com$/

For rails, you can put it on an initializer. Since this is authentication code, I usually put it on initializers/devise.rb

About the Author

Crowd Interactive is a Ruby and Rails consultancy firm powered by a team of enthusiast engineers who love programming. We turn your ideas into web applications, and we like challenging projects. We also have a lot of experience in retail, so it doesn't matter if your idea is about something you'd like to sell, we can surely help you.