Is it safe to publish a REST API client on npm even though the API is not intended for public use?

I am build a website in Angular which communicates over my REST API on my backend server.

I have managed to auto-generate the code (TypeScript) for my client and now I need it to be available on deployment.

There are several ways to do … Continue reading Is it safe to publish a REST API client on npm even though the API is not intended for public use?

How to invalidate JWT tokens without a database lookup with each request to the server?

JWT Bearer token and stateless REST API question

I am implementing a stateless REST API. I am used to using sessions built into frameworks or 0Auth but now I am in the process of developing my own jwt bearer auth implementation instead of… Continue reading How to invalidate JWT tokens without a database lookup with each request to the server?

Is it useful to have separate access tokens and refresh tokens if they’re going to be stored on the client-side as cookie?

(This is a followup to my question about a general security scheme here)

As part of an authentication scheme for a single-page application + REST API, I planned to provide authenticated clients with a short-lived access JWT … Continue reading Is it useful to have separate access tokens and refresh tokens if they’re going to be stored on the client-side as cookie?