Skip to content

Commit

Permalink
fix(!os): ask for csrf token on authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
thib3113 authored Feb 9, 2025
1 parent f16756c commit 5bf3972
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/UnifiAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,12 @@ export class UnifiAuth extends ObjectWithPrivateValues {
data[this.unifiOs ? 'token' : 'ubic_2fa_token'] = token2FA;
}


if (!this.unifiOs) {
// without this non unifios > 9 doesn't return csrf token
data.strict = true
}

// non unifiOS => token work 7 days with rememberMe
const res = await this.controllerInstance.post(this.unifiOs ? '/auth/login' : '/login', data, {
authenticationRequest: true,
Expand Down

0 comments on commit 5bf3972

Please sign in to comment.