Skip to content
This repository has been archived by the owner on Nov 12, 2018. It is now read-only.

Commit

Permalink
Allow login from non-Rails app.
Browse files Browse the repository at this point in the history
The login form is often on a 3rd party system (brochure site, etc.) so
we need to disable the authenticity token checking on login. It is not
really needed anyway.
  • Loading branch information
eric1234 committed Aug 28, 2013
1 parent 367012b commit ed5a188
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/controllers/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
class SessionsController < ApplicationController
PUBLIC_ACTIONS = %w(new create)

# Login form might be hosted elsewhere (brochure site). Protection
# not really needed for this action anyway.
skip_before_filter :verify_authenticity_token, only: :create

# The login form
def new
@session = Session.new
Expand Down

0 comments on commit ed5a188

Please sign in to comment.