chore: Update modules providers configuration with 'identifier' and 'PROVIDER' (#9636)

* chore: Update modules providers configuration with 'identifier' and 'PROVIDER'

* update check

* fix tests

* type

* normalize auth provider

* emailpass

* providers

---------

Co-authored-by: Carlos R. L. Rodrigues <rodrigolr@gmail.com>
Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
This commit is contained in:
Adrien de Peretti
2024-10-18 09:24:15 +02:00
committed by GitHub
parent 902ac12f73
commit 876d8072e7
22 changed files with 131 additions and 67 deletions

View File

@@ -18,6 +18,9 @@ interface LocalServiceConfig extends GithubAuthProviderOptions {}
// TODO: Add state param that is stored in Redis, to prevent CSRF attacks
export class GithubAuthService extends AbstractAuthModuleProvider {
static identifier = "github"
static DISPLAY_NAME = "Github Authentication"
protected config_: LocalServiceConfig
protected logger_: Logger
@@ -39,7 +42,8 @@ export class GithubAuthService extends AbstractAuthModuleProvider {
{ logger }: InjectedDependencies,
options: GithubAuthProviderOptions
) {
super({}, { provider: "github", displayName: "Github Authentication" })
// @ts-ignore
super(...arguments)
this.config_ = options
this.logger_ = logger
}