[Feature Request] User account confirmation (#23)
This commit is contained in:
@@ -1,25 +1,23 @@
|
||||
import { BaseDomain } from 'core/domain/common'
|
||||
|
||||
export class LoginUser extends BaseDomain{
|
||||
export class LoginUser extends BaseDomain {
|
||||
|
||||
constructor(uid: string){
|
||||
super()
|
||||
constructor (private _uid: string, private _emailVerified: boolean) {
|
||||
super()
|
||||
}
|
||||
|
||||
this._uid = uid
|
||||
}
|
||||
|
||||
/**
|
||||
* User identifier
|
||||
*
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LoginUser
|
||||
*/
|
||||
|
||||
private _uid : string
|
||||
public get uid() : string {
|
||||
return this._uid
|
||||
}
|
||||
public get uid (): string {
|
||||
return this._uid
|
||||
}
|
||||
|
||||
|
||||
public get emailVerified (): boolean {
|
||||
return this._emailVerified
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
export class SocialError {
|
||||
export class SocialError extends Error {
|
||||
private _isError: Boolean
|
||||
|
||||
constructor (private _code: string, private _message: string) {
|
||||
super(_message)
|
||||
this._isError = true
|
||||
}
|
||||
/**
|
||||
* Error code
|
||||
*
|
||||
@@ -26,13 +32,8 @@ export class SocialError {
|
||||
* @memberof SocialError
|
||||
*/
|
||||
|
||||
private _isError: Boolean
|
||||
public get isError (): Boolean {
|
||||
return this._isError
|
||||
}
|
||||
|
||||
constructor (private _code: string, private _message: string) {
|
||||
this._isError = true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ export interface IAuthorizeService {
|
||||
*
|
||||
* @memberof IAuthorizeService
|
||||
*/
|
||||
onAuthStateChanged: (callBack: (user: User) => void) => void
|
||||
onAuthStateChanged: (callBack: (isVerifide: boolean, user: User) => void) => void
|
||||
|
||||
/**
|
||||
* Reset user password
|
||||
@@ -48,4 +48,11 @@ export interface IAuthorizeService {
|
||||
* @memberof IAuthorizeService
|
||||
*/
|
||||
resetPassword: (email: string) => Promise<void>
|
||||
|
||||
/**
|
||||
* Send email verification
|
||||
*
|
||||
* @memberof IAuthorizeService
|
||||
*/
|
||||
sendEmailVerification: () => Promise<void>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user