Session token/IP based user authentication added
This commit is contained in:
parent
d866f17405
commit
c87011ff84
3 changed files with 11 additions and 4 deletions
|
|
@ -9,6 +9,7 @@ class ApplicationController < ActionController::Base
|
|||
# and show them even before moderation.
|
||||
def create_user_token
|
||||
session[:token] ||= SecureRandom.hex
|
||||
session[:ip] ||= request.remote_ip
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue