user3168219
user3168219

Reputation: 315

Javascript store credentials (Backbone)

I created a stateless RESTful API secured by HTTP Basic.

On the client side I will create a login form sending a request to /auth-check to check the credentials and depending on the status code, I will store these credentials on the client side and use that to perform the next requests.

I am looking for the safest way to store the user credentials on the client side so users don't have to submit them at each request or loose them when they leave the site.

Upvotes: 0

Views: 60

Answers (1)

Evan Knowles
Evan Knowles

Reputation: 7501

Don't store the user credentials. If anything, generate a unique token that that user can use to identify themselves.

Upvotes: 1

Related Questions