Adding some standard OpenID Connect providers (Google, Facebook) (WIP):

* frontend
This commit is contained in:
John Livingston
2024-04-22 14:28:55 +02:00
parent 024186ba2c
commit 0a492d1921
8 changed files with 148 additions and 93 deletions

View File

@ -85,14 +85,18 @@ async function getConverseJSParams (
)
} else {
try {
const customOidc = ExternalAuthOIDC.singleton('custom')
if (await customOidc.isOk()) {
const authUrl = customOidc.getConnectUrl()
const buttonLabel = customOidc.getButtonLabel()
if (authUrl && buttonLabel) {
externalAuthOIDC = {
buttonLabel: buttonLabel,
url: authUrl
const oidcs = ExternalAuthOIDC.allSingletons()
for (const oidc of oidcs) {
if (await oidc.isOk()) {
const authUrl = oidc.getConnectUrl()
const buttonLabel = oidc.getButtonLabel()
if (authUrl && buttonLabel) {
externalAuthOIDC ??= []
externalAuthOIDC.push({
type: oidc.type,
buttonLabel: buttonLabel,
url: authUrl
})
}
}
}