diff --git a/mon-pix/app/authenticators/gar.js b/mon-pix/app/authenticators/gar.js index 0b88a105109..d048bd3e34b 100644 --- a/mon-pix/app/authenticators/gar.js +++ b/mon-pix/app/authenticators/gar.js @@ -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'; @@ -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(); + }); + } }