patch: update sdk and packages. tested with directus 10.6.1 (#11)

Co-authored-by: Kristoffer <zs-ko@users.noreply.github.com>
This commit is contained in:
Kristoffer
2023-08-30 14:25:40 +02:00
committed by GitHub
parent 74607b1e6c
commit edc3398bbc
4 changed files with 47147 additions and 1148 deletions

View File

@@ -8,6 +8,7 @@ import { createError } from '@directus/errors';
const InvalidJWKIssuerMetadata = createError('INVALID_JWKS_ISSUER_ERROR', 'No JWKS_URL or JWKS_KEYS and could not discover JWKS_URL from openid metadata', 500);
const InvalidJWKSUrl = createError('INVALID_JWKS_ISSUER_ERROR', 'Could not retrieve any valid keys from JWKS_URL', 500);
const InvalidJWKKeys = createError('INVALID_JWKS_ISSUER_ERROR', 'No signing keys in response from provider')
export interface AuthProvider {
@@ -130,7 +131,7 @@ async function getJWKSClient(url: string) {
try {
const keys = await jwksClient.getSigningKeys()
if (keys.length == 0) {
throw new InvalidJWKSUrl();
throw new InvalidJWKKeys();
}
} catch (error) {
throw new InvalidJWKSUrl();