From aa5da74b6a3161f123f84f3c7fd69d861a8a3471 Mon Sep 17 00:00:00 2001 From: King Wang Date: Sun, 20 Jun 2021 01:24:31 +0800 Subject: [PATCH] return use --- examples/user-authentication/backend/src/api/user/ApiLogin.ts | 3 ++- .../backend/src/shared/protocols/user/PtlLogin.ts | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/user-authentication/backend/src/api/user/ApiLogin.ts b/examples/user-authentication/backend/src/api/user/ApiLogin.ts index 853ff2b..0a4cf41 100644 --- a/examples/user-authentication/backend/src/api/user/ApiLogin.ts +++ b/examples/user-authentication/backend/src/api/user/ApiLogin.ts @@ -12,6 +12,7 @@ export async function ApiLogin(call: ApiCall) { let sso = await UserUtil.createSsoToken(user.uid); call.succ({ - __ssoToken: sso + __ssoToken: sso, + user: user }) } \ No newline at end of file diff --git a/examples/user-authentication/backend/src/shared/protocols/user/PtlLogin.ts b/examples/user-authentication/backend/src/shared/protocols/user/PtlLogin.ts index ddcd494..753fe23 100644 --- a/examples/user-authentication/backend/src/shared/protocols/user/PtlLogin.ts +++ b/examples/user-authentication/backend/src/shared/protocols/user/PtlLogin.ts @@ -1,3 +1,4 @@ +import { CurrentUser } from '../../../models/CurrentUser'; import { BaseConf, BaseRequest, BaseResponse } from '../base'; export interface ReqLogin extends BaseRequest { @@ -7,6 +8,7 @@ export interface ReqLogin extends BaseRequest { export interface ResLogin extends BaseResponse { __ssoToken: string; + user: CurrentUser; } export const conf: BaseConf = {