From 80a39d748b8b28925a348cda1309ec88967114dd Mon Sep 17 00:00:00 2001 From: RogerLi Date: Sun, 23 Jun 2024 13:33:31 +0800 Subject: [PATCH] fix: google login success redirect to homepage with query string --- src/controller/indexController.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/controller/indexController.ts b/src/controller/indexController.ts index 4f09804..cd1490d 100644 --- a/src/controller/indexController.ts +++ b/src/controller/indexController.ts @@ -96,12 +96,19 @@ class IndexController extends BaseController { return this.formatResponse( CustomResponseType.OK_MESSAGE, CustomResponseType.OK, - new LoginVo(authUser, accessToken, refreshToken), + { + specific_redirect_url: + process.env.MOVIE_GO_URL + + `?account=${authUser.account}&email=${authUser.email}&token=${accessToken}&refresh_token=${refreshToken}&accountType=${authUser.accountType.toString()}`, + }, ); } else { return this.formatResponse( CustomResponseType.GOOGLE_AUTH_ERROR_MESSAGE, CustomResponseType.GOOGLE_AUTH_ERROR, + { + specific_redirect_url: process.env.MOVIE_GO_URL, + }, ); } };