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

* refactoring, to allow several OIDC singletons
* settings for google and facebook
* backend code
This commit is contained in:
John Livingston
2024-04-22 13:03:31 +02:00
parent 4bc2d4fd51
commit 024186ba2c
16 changed files with 341 additions and 142 deletions

View File

@ -197,9 +197,13 @@ async function getProsodyConfig (options: RegisterServerOptionsV5): Promise<Pros
let useExternal: boolean = false
try {
const oidc = ExternalAuthOIDC.singleton()
if (await oidc.isOk()) {
useExternal = true
const oidcs = ExternalAuthOIDC.allSingletons()
for (const oidc of oidcs) {
if (await oidc.isOk()) {
// At least one external authentcation => we must enable the external virtual host.
useExternal = true
break
}
}
} catch (err) {
logger.error(err)