Possibility to configure an OpenID Connect provider on the instance level WIP (#128).
This commit is contained in:
@ -160,6 +160,7 @@ async function initConverse (
|
||||
// no viewer mode if authenticated.
|
||||
params.livechat_enable_viewer_mode = autoViewerMode && !isAuthenticated && !isRemoteWithNicknameSet
|
||||
params.livechat_external_auth_oidc_button_label = initConverseParams.externalAuthOIDC?.buttonLabel
|
||||
params.livechat_external_auth_oidc_url = initConverseParams.externalAuthOIDC?.url
|
||||
|
||||
if (chatIncludeMode === 'peertube-video') {
|
||||
params.livechat_mini_muc_head = true // we must replace the muc-head by the custom buttons toolbar.
|
||||
|
@ -9,14 +9,15 @@ export const tplExternalLoginModal = (el, o) => {
|
||||
const i18nRemotePeertubeUrl = __(LOC_login_remote_peertube_url)
|
||||
const i18nRemotePeertubeOpen = __('OK')
|
||||
const externalAuthOIDCButtonLabel = api.settings.get('livechat_external_auth_oidc_button_label')
|
||||
const externalAuthOIDCUrl = api.settings.get('livechat_external_auth_oidc_url')
|
||||
return html`<div class="modal-body livechat-external-login-modal">
|
||||
${!externalAuthOIDCButtonLabel
|
||||
${!externalAuthOIDCButtonLabel || !externalAuthOIDCUrl
|
||||
? ''
|
||||
: html`
|
||||
<div class="livechat-external-login-modal-external-auth-oidc">
|
||||
<button
|
||||
class="btn btn-primary"
|
||||
@click=${() => console.log('ok, go')}
|
||||
@click=${() => window.open(externalAuthOIDCUrl)}
|
||||
>
|
||||
${externalAuthOIDCButtonLabel}
|
||||
</button>
|
||||
|
@ -37,7 +37,7 @@ export const livechatSpecificsPlugin = {
|
||||
for (const k of [
|
||||
'hide_muc_participants',
|
||||
'livechat_enable_viewer_mode',
|
||||
'livechat_external_auth_oidc_button_label',
|
||||
'livechat_external_auth_oidc_button_label', 'livechat_external_auth_oidc_url',
|
||||
'livechat_mini_muc_head'
|
||||
]) {
|
||||
_converse.api.settings.set(k, params[k])
|
||||
|
@ -9,7 +9,8 @@ export const livechatViewerModePlugin = {
|
||||
livechat_enable_viewer_mode: false,
|
||||
livechat_peertube_video_original_url: undefined,
|
||||
livechat_peertube_video_uuid: undefined,
|
||||
livechat_external_auth_oidc_button_label: undefined
|
||||
livechat_external_auth_oidc_button_label: undefined,
|
||||
livechat_external_auth_oidc_url: undefined
|
||||
})
|
||||
|
||||
const originalGetDefaultMUCNickname = _converse.getDefaultMUCNickname
|
||||
|
Reference in New Issue
Block a user