Skip to content

Commit

Permalink
fix(mon-pix): deconnexion when user GAR authenticated refresh the page
Browse files Browse the repository at this point in the history
  • Loading branch information
bpetetot committed Dec 10, 2024
1 parent ac2e9a1 commit 37e58c3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions mon-pix/app/authenticators/gar.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { isEmpty } from '@ember/utils';
import BaseAuthenticator from 'ember-simple-auth/authenticators/base';
import { decodeToken } from 'mon-pix/helpers/jwt';
import RSVP from 'rsvp';
Expand All @@ -13,4 +14,13 @@ export default class GarAuthenticator extends BaseAuthenticator {
source,
});
}

restore(data) {
return new RSVP.Promise((resolve, reject) => {
if (!isEmpty(data['access_token'])) {
resolve(data);
}
reject();
});
}
}

0 comments on commit 37e58c3

Please sign in to comment.