Hello,
I now that it might be just a plain configuration error on my side but the documentation regarding adding settings is unfortunately not very exhaustive.
I have the following js/src/admin/index.ts
import app from 'flarum/admin/app';
app.initializers.add('dnw-sso', (app) => {
app.extensionData.for('wulfheart/flarum-dnw-auth')
.registerSetting({
setting: 'dnw-sso.client_id',
type: 'text',
label: 'Client ID',
})
.registerSetting({
setting: 'dnw-sso.client_secret',
type: 'text',
})
.registerSetting({
setting: 'dnw-sso.auth_url',
type: 'text',
})
.registerSetting({
setting: 'dnw-sso.optional_auth_url',
type: 'text',
})
});
It didn't show up in the the settings of the extension so I also added it in the extend.php:
<?php
namespace Wulfheart\FlarumDnwAuth;
use Flarum\Extend;
return [
(new Extend\Frontend('forum'))
->js(__DIR__ . '/js/dist/forum.js')
->css(__DIR__ . '/less/forum.less'),
(new Extend\Frontend('admin'))
->js(__DIR__ . '/js/dist/admin.js')
->css(__DIR__ . '/less/admin.less'),
(new Extend\Settings())
->serializeToForum('dnw-sso.client_id', 'dnw-sso.client_id')
->serializeToForum('dnw-sso.client_secret', 'dnw-sso.client_secret')
->serializeToForum('dnw-sso.auth_url', 'dnw-sso.auth_url')
->serializeToForum('dnw-sso.optional_auth_url', 'dnw-sso.optional_auth_url')
];
Unfortunately this also didn't work.
How can I made these settings show in the extension settings page?
Thank you in advance.