Next.js starter your AI actually understands. Ship internal tools in days not weeks. Pre-order $199 $499 → [Get it now]

How to refresh JWT tokens in Angular

Automatic JWT token refresh prevents users from being logged out during active sessions while maintaining security. As the creator of CoreUI with 12 years of Angular development experience, I’ve implemented token refresh mechanisms for enterprise applications with millions of authenticated users.

The most secure approach is to use an HTTP interceptor that detects 401 errors and refreshes the token automatically before retrying the failed request.

Read More…

How to store tokens securely in Angular

Storing authentication tokens securely is critical for preventing XSS attacks and unauthorized access. As the creator of CoreUI with 12 years of Angular development experience, I’ve implemented token storage strategies for enterprise applications handling sensitive financial and healthcare data.

The most secure approach is to use httpOnly cookies for storage and avoid localStorage entirely for sensitive tokens.

Read More…

How to generate random strings in Node.js

Generating secure random strings is essential for creating unique identifiers, authentication tokens, and session IDs in Node.js applications. As the creator of CoreUI, a widely used open-source UI library, I’ve implemented random string generation in countless Node.js authentication systems and API services. From my 25 years of experience in web development and 11 years with Node.js, the most secure and reliable approach is to use Node.js built-in crypto.randomBytes() method. This method provides cryptographically strong random values suitable for security-sensitive applications.

Read More…