Add OAuth Login facebook,google,github

This commit is contained in:
Qolzam
2017-11-18 19:04:31 +07:00
parent f64b7bb24d
commit 92379b615c
23 changed files with 513 additions and 264 deletions

View File

@@ -1,7 +1,9 @@
import {User} from './user'
import {Profile} from './profile'
import { User } from './user'
import { Profile } from './profile'
import { UserProvider } from './userProvider'
export {
User,
Profile
}
Profile,
UserProvider
}

View File

@@ -1,45 +1,14 @@
import { BaseDomain } from 'core/domain/common'
export class Profile extends BaseDomain {
constructor (
public avatar: string,
public fullName: string,
public banner: string,
public tagLine: string,
public email?: string | null) {
super()
/**
* User avatar address
*
* @type {string}
* @memberof Profile
*/
public avatar: string
/**
* User email
*
* @type {string}
* @memberof Profile
*/
public email?: string | null
/**
* User full name
*
* @type {string}
* @memberof Profile
*/
public fullName: string
/**
* The banner address of user profile
*
* @type {string}
* @memberof Profile
*/
public banner: string
/**
* User tag line
*
* @type {string}
* @memberof Profile
*/
public tagLine: string
}
}

View File

@@ -0,0 +1,18 @@
/**
* User provide data
*
* @export
* @class UserProvider
*/
export class UserProvider {
constructor (
public userId: string,
public email: string,
public fullName: string,
public avatar: string,
public providerId: string,
public provider: string,
public accessToken: string
) {}
}