private async verifyAndExchangeCode()

in src/auth/AuthorizationCodeWithPKCEStrategy.ts [75:85]


    private async verifyAndExchangeCode(code: string) {
        const cachedItem = await this.cache.get<CachedVerifier>("spotify-sdk:verifier");
        const verifier = cachedItem?.verifier;

        if (!verifier) {
            throw new Error("No verifier found in cache - can't validate query string callback parameters.");
        }

        await this.configuration!.redirectionStrategy.onReturnFromRedirect();
        return await this.exchangeCodeForToken(code, verifier!);
    }