Aayush Khandelwal
Aayush Khandelwal

Reputation: 1071

What happens to rails authenticity token after refresh and when it is created

I want to know when does a authentication token in rails is generated again. Because whenever I refresh the page token doesn't changes? and I want to know when it will change again

possible duplicate:

rails 3 authenticity_token how it is generated

Upvotes: 1

Views: 589

Answers (1)

lest
lest

Reputation: 8100

Rails authenticity token is used for CSRF protection. It's stored in session (source) and it'll be regenerated only when session is destroyed (e.g. when you close browser or clear session cookie).

Upvotes: 2

Related Questions