private async redirectOrVerifyToken()

in src/auth/AuthorizationCodeWithPKCEStrategy.ts [50:62]


    private async redirectOrVerifyToken(): Promise<AccessToken> {
        const hashParams = new URLSearchParams(window.location.search);
        const code = hashParams.get("code");

        if (code) {
            const token = await this.verifyAndExchangeCode(code);
            this.removeCodeFromUrl();
            return token;
        }

        this.redirectToSpotify();
        return emptyAccessToken; // Redirected away at this point, just make TypeScript happy :)         
    }