Question

I have a rails site that I'm ready to launch for beta testing and am wondering what the best way to do it is. We currently use FB connect via omniauth to register users but I want to limit registration during our beta to a list of people that have already signed up.

I have review this thread and am not really looking for someone to manage our beta test. I just simply want only approved beta testers to be able to register.

Was it helpful?

Solution

You could do something really simple and have a HTTP basic auth before-filter:

class ApplicationController < ActionController::Base
  before_filter :beta_protection

  def beta_protection
    return true unless Rails.env.beta?
    authenticate_or_request_with_http_basic do |username, password|
      username == "username" && password == "password"
    end
  end
end

This won't look super great, but you can use this (and give the username and password out to beta users) to add in a simple, easy way to control access to your site.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top