fix: Update generated keys in ExpiringAdapterFactory to prevent overlap

If the keys were not encoded there could be an issue
where there were 2 similar keys `grant/123` and `Grant/123`.
This commit is contained in:
Joachim Van Herwegen 2023-10-10 14:48:02 +02:00
parent 7684198b53
commit 2914fd7d60

View File

@ -19,15 +19,15 @@ export class ExpiringAdapter implements Adapter {
}
private grantKeyFor(id: string): string {
return `grant/${encodeURIComponent(id)}`;
return `grants/${encodeURIComponent(id)}`;
}
private userCodeKeyFor(userCode: string): string {
return `user_code/${encodeURIComponent(userCode)}`;
return `user_codes/${encodeURIComponent(userCode)}`;
}
private uidKeyFor(uid: string): string {
return `uid/${encodeURIComponent(uid)}`;
return `uids/${encodeURIComponent(uid)}`;
}
private keyFor(id: string): string {