Add OAuth Login facebook,google,github
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
18
src/core/domain/users/userProvider.ts
Normal file
18
src/core/domain/users/userProvider.ts
Normal 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
|
||||
) {}
|
||||
}
|
||||
Reference in New Issue
Block a user