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:
committed by
GitHub
parent
902ac12f73
commit
876d8072e7
@@ -69,22 +69,32 @@ export abstract class AbstractAuthModuleProvider implements IAuthProvider {
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
private static PROVIDER: string
|
||||
static identifier: string
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
private static DISPLAY_NAME: string
|
||||
static DISPLAY_NAME: string
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
protected readonly container_: any
|
||||
|
||||
/**
|
||||
* @deprecated Use `identifier` instead.
|
||||
* @ignore
|
||||
*/
|
||||
public get provider() {
|
||||
return (this.constructor as typeof AbstractAuthModuleProvider).PROVIDER
|
||||
return (this.constructor as typeof AbstractAuthModuleProvider).identifier
|
||||
}
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
public get identifier() {
|
||||
return (this.constructor as typeof AbstractAuthModuleProvider).identifier
|
||||
}
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -98,21 +108,6 @@ export abstract class AbstractAuthModuleProvider implements IAuthProvider {
|
||||
*/
|
||||
static validateOptions(options: Record<any, any>): void | never {}
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @privateRemarks
|
||||
* Documenting the constructor in the class's TSDocs as it's difficult to relay
|
||||
* the necessary information with this constructor's signature.
|
||||
*/
|
||||
protected constructor({}, config: { provider: string; displayName: string }) {
|
||||
this.container_ = arguments[0]
|
||||
;(this.constructor as typeof AbstractAuthModuleProvider).PROVIDER ??=
|
||||
config.provider
|
||||
;(this.constructor as typeof AbstractAuthModuleProvider).DISPLAY_NAME ??=
|
||||
config.displayName
|
||||
}
|
||||
|
||||
/**
|
||||
* This method authenticates the user.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user