lynndylanhurley / j-toker

Simple, secure token authentication for jQuery.
Do What The F*ck You Want To Public License
173 stars 46 forks source link

Can jquery-cookie be specified as optional? #27

Open g8d3 opened 7 years ago

g8d3 commented 7 years ago

On readme it says jquery-cookie: Persist data through browser sessions.

Could we put:

jquery-cookie: Persist data through browser sessions. Only if configured with `storage: 'cookies'`

This is just when using storage: 'cookies', right?

Could this be specified I had to read the code to figure that if I use cookies storage in a local HTML file that will not be set in most browsers and $.get will not append headers, then not setting user in server getting:

Authorized users only

I think this problem is related to:

https://github.com/lynndylanhurley/devise_token_auth/issues/690 https://github.com/lynndylanhurley/devise_token_auth/issues/353 https://github.com/lynndylanhurley/devise_token_auth/issues/258 https://github.com/lynndylanhurley/devise_token_auth/issues/74

All of them point to the same issue, I think, how to use j-toker correctly with Rails.

Even when writing that jquery cookie is optional will not solve all these issues since a more complete and concise guide is needed, it can help a bit.

jamsi commented 5 years ago

Feel free to make a PR for this text change :)