Pitfalls of manual AES encryption for data transfer [migrated]

Context
I’ve used OpenSSL to encrypt some socket communications.
I am however using some functionality from the windows API that prevents me from using OpenSSL’s opaque builtin sockets, so I am buffering through their BIO_s_mem interfaces … Continue reading Pitfalls of manual AES encryption for data transfer [migrated]

can we use access token as session cookie in browser? and how to protect it?

The scenario is: you have refresh token that is valid for a longer period of time and an access token that is valid for a shorter period of time.
The setup: There is a client, application server and authentication server.
The client stores… Continue reading can we use access token as session cookie in browser? and how to protect it?

Best practices for access and refresh tokens timeout lengths [duplicate]

I’m currently working on an international marketplace website and trying to decide the appropriate timeout lengths for access and refresh tokens.
We try to do the timeouts to be as strict as possible to make it more difficult for bad actor… Continue reading Best practices for access and refresh tokens timeout lengths [duplicate]

Prevent Session Hijacking with copying all metadata from a browser

For example, I’m signed in to my Gmail account. If I copy all data from all the places that Chrome uses (localstorage, all the cookies, all temp folders and so on) to another PC.

How does Google prevent my old session from hijacking?
Let’… Continue reading Prevent Session Hijacking with copying all metadata from a browser

Is there a problem with the use of HTTP cookies as auth tokens in mobile apps?

Imagine you have a website, for which you have configured a proper and secure session management / login system, using first-party / session cookies. Any interaction with that website is setup in the form of a REST API, so there are no HTM… Continue reading Is there a problem with the use of HTTP cookies as auth tokens in mobile apps?

Why do we use Session ID cookies on the web instead of a unique device identifier?

Session IDs aren’t exactly secure, you can copy them from one device to another just by copying the browser’s temp files. Techniques to tell apart one device from another have existed in browsers for a while, for example this here.
Sure yo… Continue reading Why do we use Session ID cookies on the web instead of a unique device identifier?