Fix renewing nxapi-auth token

This commit is contained in:
Samuel Elliott 2025-07-27 17:10:47 +01:00
parent 00ab5fc623
commit 080d110d1f
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6

View File

@ -393,7 +393,7 @@ export class ZncaApiNxapi extends ZncaApi implements RequestEncryptionProvider {
if (response.status !== 200) {
const err = await ErrorResponse.fromResponse<AndroidZncaFError>(response, '[znca-api] Non-200 status code');
if (this.auth && err.data?.error === 'invalid_token' && _attempt) {
if (this.auth && err.data?.error === 'invalid_token' && !_attempt) {
this.auth.token = null;
return this.genf(token, hash_method, user, encrypt_token_request, _attempt + 1);