Skip to content

Commit

Permalink
fix(classic-test-app): extending authenticator
Browse files Browse the repository at this point in the history
  • Loading branch information
BobrImperator committed Dec 29, 2024
1 parent aec17dd commit 7d3b6fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions packages/classic-test-app/app/authenticators/oauth2.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import OAuth2PasswordGrant from 'ember-simple-auth/authenticators/oauth2-password-grant';
import config from '../config/environment';

export default OAuth2PasswordGrant.extend({
serverTokenEndpoint: `${config.apiHost}/token`,
serverTokenRevocationEndpoint: `${config.apiHost}/revoke`,
});
export default class OAuth2 extends OAuth2PasswordGrant {
serverTokenEndpoint = `${config.apiHost}/token`;
serverTokenRevocationEndpoint = `${config.apiHost}/revoke`;
}
3 changes: 2 additions & 1 deletion packages/classic-test-app/app/components/login-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ export default Component.extend({
await this.get('session').authenticate('authenticator:oauth2', identification, password);

if (this.rememberMe) {
this.get('session').set('store.cookieExpirationTime', 60 * 60 * 24 * 14);
this.get('session').set('cookieExpirationTime', 60 * 60 * 24 * 14);
}
} catch (response) {
console.error(response.toString());
this.set('errorMessage', response.toString());
}
}),
Expand Down

0 comments on commit 7d3b6fa

Please sign in to comment.