Apparently SecureRandom is not that secure. Still, there's a trade-off here: pick something from standard lib or pick a little known gem maintained by someone. For a well-informed decision I suggest reading the sysrandom's README and the blog post How to Generate Secure Random Numbers in Various Programming Languages.
Apparently SecureRandom is not that secure. Still, there's a trade-off here: pick something from standard lib or pick a little known gem maintained by someone. For a well-informed decision I suggest reading the sysrandom's README and the blog post How to Generate Secure Random Numbers in Various Programming Languages.
Apparently SecureRandom is not that secure. Still, there's a trade-off here: pick something from standard lib or pick a little known gem maintained by someone. For a well-informed decision I suggest reading the sysrandom's README and the blog post How to Generate Secure Random Numbers in Various Programming Languages.
Apparently SecureRandom is not that secure. Still, there's a trade-off here: pick something from standard lib or pick a little known gem maintained by someone. For a well-informed decision I suggest reading the sysrandom's README and the blog post How to Generate Secure Random Numbers in Various Programming Languages.
Apparently SecureRandom is not that secure. Still, there's a trade-off here: pick something from standard lib or pick a little known gem maintained by someone. For a well-informed decision I suggest reading the sysrandom's README and the blog post How to Generate Secure Random Numbers in Various Programming Languages.
There should be some kind of mechanism that causes the token to expire. When implementing this mechanism take into account the trade-off between UX and security.
Native mobile apps using Facebook's SDKs will get long-lived access tokens, good for about 60 days. These tokens will be refreshed once per day when the person using your app makes a request to Facebook's servers. If no requests are made, the token will expire after about 60 days and the person will have to go through the login flow again to get a new token.
Upgrade to Rails 4 to use its encrypted cookie store. If you can't, then encrypt the cookie store yourself, like suggested herehere. There would absolutely be no problem in storing an authentication token in an encrypted cookie store.
There should be some kind of mechanism that causes the token to expire. When implementing this mechanism take into account the trade-off between UX and security.
Native mobile apps using Facebook's SDKs will get long-lived access tokens, good for about 60 days. These tokens will be refreshed once per day when the person using your app makes a request to Facebook's servers. If no requests are made, the token will expire after about 60 days and the person will have to go through the login flow again to get a new token.
Upgrade to Rails 4 to use its encrypted cookie store. If you can't, then encrypt the cookie store yourself, like suggested here. There would absolutely be no problem in storing an authentication token in an encrypted cookie store.
There should be some kind of mechanism that causes the token to expire. When implementing this mechanism take into account the trade-off between UX and security.
Native mobile apps using Facebook's SDKs will get long-lived access tokens, good for about 60 days. These tokens will be refreshed once per day when the person using your app makes a request to Facebook's servers. If no requests are made, the token will expire after about 60 days and the person will have to go through the login flow again to get a new token.
Upgrade to Rails 4 to use its encrypted cookie store. If you can't, then encrypt the cookie store yourself, like suggested here. There would absolutely be no problem in storing an authentication token in an encrypted cookie store.