add new oauth provider

add google idconnect as new auth provider
This commit is contained in:
2025-08-06 15:31:24 +07:00
parent 419b5b0ae4
commit 0d71710b14
7 changed files with 121 additions and 1 deletions

View File

@ -0,0 +1,18 @@
import { Context } from "elysia";
import { mainErrorHandler } from "../../../helpers/error/handler";
import { googleRequestService } from "../services/googleRequest.service";
import { returnReadResponse } from "../../../helpers/callback/httpResponse";
export const googleRequestController = async (ctx: Context) => {
try {
const loginUrl = await googleRequestService();
return returnReadResponse(
ctx.set,
200,
"Google login url created!",
loginUrl
);
} catch (error) {
return mainErrorHandler(ctx.set, error);
}
};