user938363
user938363

Reputation: 10350

Does Rails secret token have to be unique for each rails app?

In secret_token.rb under rails initializers, there is secret token appearing as a string of random chars and numbers which must be 30 chars or longer. For max security, does this secret token have to be unique for each and every rails app deployed? We plan to use a rails template which may have the same secret token for every app developed from the same template. Thanks so much.

Upvotes: 1

Views: 2522

Answers (1)

gabrielhilal
gabrielhilal

Reputation: 10769

Yesterday I was reading an article about security, and I believe it is important to ensure the uniqueness of your secret_token.

You can use any previous project as template (everybody does that), but for security reasons you should generate a new secret_token.

In this article, they explain how to generate a new secret_token through the vegas-gem. I haven't tried yet....

Also take a look in the links below:

I Hope it helps...

Upvotes: 5

Related Questions