You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the applications of this extension might be external user management system for one or more Flarum instances. In this case one might need to hide default Flarum user management modals and restrict authentication to OAuth server only.
It might be handy to have additional boolean setting in extension admin area for this flow.
Front-end forum/index.js can have additional block:
import HeaderSecondary from "flarum/components/HeaderSecondary";
import SettingsPage from "flarum/components/SettingsPage";
app.initializers.add('fof-passport', () => {
//....
//Removes Flarum default header signUp logIn links and ads OAuth button
extend(HeaderSecondary.prototype, 'items', function(items) {
//If user isn't logged in displays FoF Passport LogIn button
if (!app.session.user) {
items.add('fof-passport', LogInButton.component({
className: 'Button LogInButton--passport',
icon: app.forum.attribute('fof-passport.loginIcon'),
path: '/auth/passport',
children: app.forum.attribute('fof-passport.loginTitle'),
}));
}
//Remove Login and signUp buttons
items.remove("logIn");
items.remove("signUp");
});
//Remove account details change buttons from profile
extend(SettingsPage.prototype, 'accountItems', function(items) {
items.remove('changeEmail');
items.remove('changePassword');
});
});
The text was updated successfully, but these errors were encountered:
One of the applications of this extension might be external user management system for one or more Flarum instances. In this case one might need to hide default Flarum user management modals and restrict authentication to OAuth server only.
It might be handy to have additional boolean setting in extension admin area for this flow.
Front-end forum/index.js can have additional block:
The text was updated successfully, but these errors were encountered: