-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Hi,
I’m working with Azure Cache for Redis and Microsoft Entra ID (formerly Azure AD) authentication. Azure supports connecting to Redis using Entra access tokens instead of a static password. These tokens expire after ~1 hour and require automatic refresh.
Currently, ioredis only supports static connection strings/passwords. This makes it difficult to use with Azure Entra ID, since we’d have to manually recreate the client whenever a token expires.
Feature request:
Add support for token-based authentication for Redis when using Azure Entra ID.
Ideally provide a way to plug in a token provider (e.g., from @azure/identity or MSAL) so ioredis can refresh the token automatically before expiration.
Use case:
Applications connecting to Azure Cache for Redis using enterprise authentication (Entra ID) instead of static keys.
Frameworks like @fastify/redis rely on ioredis internally, so this feature would enable ecosystem-wide adoption.
References:
Azure docs: Authenticate with Microsoft Entra ID to access Azure Cache for Redis
Would this be considered for future support?
Thanks!