I'm looking for ideas to authenticate a user without the usual trip to a server. Any semi-secure way of authenticating a user on the client side is acceptable. I'm think of storing some encrypted secret in a js file, then only users that have the correct code will be able to decrypt it, and the correct code can be either entered or stored in a cookie or something. Sound good, or any other ideas? Take a look at oauth by client side javascript. Search google for 'oauth client side only'. For example, this - https://developers.google.com/accounts/docs/OAuth2UserAgent I'm think of storing some