Skip to content

Commit

Permalink
fix: compatibility with private facade (#25)
Browse files Browse the repository at this point in the history
* fix: compatibility with private facade

* Apply fixes from StyleCI

* bump

* min version

---------

Co-authored-by: StyleCI Bot <[email protected]>
  • Loading branch information
imorland and StyleCIBot authored Feb 4, 2024
1 parent c064109 commit d4e11f8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
"flarum/testing": "^1.8.0",
"fof/oauth": "*",
"flarum/phpstan": "^1.8",
"blomstra/gdpr": "@beta"
"blomstra/gdpr": "@beta",
"sycho/flarum-private-facade": "^0.1.16"
}
}
8 changes: 7 additions & 1 deletion extend.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,16 @@
(new Extend\Routes('forum'))
->get('/twofactor/oauth/verify', 'twoFactor.oauth', Api\Controller\TwoFactorOAuthController::class)
->post('/twofactor/oauth/verify', 'twoFactor.oauth.verify', Api\Controller\TwoFactorOAuthVerifyController::class),

(new Extend\Conditional())
->whenExtensionEnabled('sycho-private-facade', fn () => [
(new \SychO\PrivateFacade\Extend\FacadeExclusions())
->addBackendRouteExclusion('twoFactor.oauth')
->addBackendRouteExclusion('twoFactor.oauth.verify')
]),
])
->whenExtensionEnabled('blomstra-gdpr', fn () => [
(new UserData())
->addType(Data\TwoFactorData::class),
]),

];
2 changes: 1 addition & 1 deletion js/src/forum/extendLogInModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default function extendLogInModal() {

override(LogInModal.prototype, 'footer', function (original) {
if (this.twoFactorRequired) {
return null;
return <div />;
}

return original();
Expand Down

0 comments on commit d4e11f8

Please sign in to comment.