instance method
generate_csrf_token
Ruby on Rails 7.2.3
Since v7.2.3 PrivateSignature
generate_csrf_token()
No documentation comment.
Source
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 657
def generate_csrf_token
SecureRandom.urlsafe_base64(AUTHENTICITY_TOKEN_LENGTH)
end
Defined in actionpack/lib/action_controller/metal/request_forgery_protection.rb line 657
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::RequestForgeryProtection