PropelAuth Adds Support for Rails
Rails is a web framework that provides a ton of features of the box. You can quickly make a CRUD API, manage your DB schemas, and a lot more.
With PropelAuth, you can easily build and configure login, signup, account pages, organization management, transactional emails, and more in a matter of minutes. We provide pre-built UIs so you can both get live faster and test the entire experience before you write any code.
You can then write a controller as simple as:
class WhoamiController < ApplicationController
before_action :require_user
def index
render json: @user
end
end
Users without valid access tokens are rejected and all you have to do is manage a user_id. The library also supports B2B auth - you can easily check if a user is a member of an organization or has permission to perform a specific action.
class WhoamiController < ApplicationController
before_action do
require_org_member(params[:org_id], minimum_required_role: PropelAuth::UserRole::Admin)
end
def index
# both @user and @org are set
render json: @org
end
end
Want to try it out? Check out our getting started guide or the full reference for Rails.