📝 docs: complete documentation for auth module
Some checks failed
Integration Tests / integration-tests (pull_request) Failing after 42s

This commit is contained in:
2026-03-11 10:07:33 +07:00
parent da74f5e3e1
commit 864a919680
8 changed files with 242 additions and 29 deletions

View File

@ -1,14 +1,17 @@
import { Context } from "elysia";
import { Context, Static } from "elysia";
import { returnWriteResponse } from "../../../helpers/callback/httpResponse";
import { githubCallbackService } from "../services/http/githubCallback.service";
import { mainErrorHandler } from "../../../helpers/error/handler";
import { getUserHeaderInformation } from "../../../helpers/http/userHeader/getUserHeaderInformation";
import { githubCallbackSchema } from "../schemas/githubCallback.schema";
export const githubCallbackController = async (
ctx: Context & { query: { code: string; callbackURI: string } }
) => {
export const githubCallbackController = async (ctx: {
set: Context["set"];
query: Static<typeof githubCallbackSchema.query>;
headers: Static<typeof githubCallbackSchema.headers>;
}) => {
try {
const userHeaderInfo = getUserHeaderInformation(ctx);
const userHeaderInfo = getUserHeaderInformation(ctx.headers["x-client-info"]);
const authToken = await githubCallbackService(ctx.query, userHeaderInfo);
return returnWriteResponse(ctx.set, 200, "Authenticated successfully!", {