[Feature Request] User account confirmation (#23)

This commit is contained in:
Qolzam
2017-11-16 11:44:45 +07:00
parent 55789967eb
commit f64b7bb24d
26 changed files with 571 additions and 231 deletions

View File

@@ -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
}
}
}

View File

@@ -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
}
}

View File

@@ -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>
}