🏗️ separate http and internal service

separate between internal and http service due security concern in auth module
This commit is contained in:
2025-08-07 23:07:53 +07:00
parent 0d71710b14
commit ac0b25fb62
9 changed files with 21 additions and 15 deletions

View File

@ -1,5 +1,5 @@
import { AppError } from "../../../helpers/error/instances/app";
import { githubProvider } from "../providers/github.provider";
import { AppError } from "../../../../helpers/error/instances/app";
import { githubProvider } from "../../providers/github.provider";
export const githubCallbackService = async (code: string) => {
try {

View File

@ -1,6 +1,6 @@
import * as arctic from "arctic";
import { githubProvider } from "../providers/github.provider";
import { AppError } from "../../../helpers/error/instances/app";
import { githubProvider } from "../../providers/github.provider";
import { AppError } from "../../../../helpers/error/instances/app";
export const githubRequestService = async () => {
try {

View File

@ -1,7 +1,7 @@
import { AppError } from "../../../helpers/error/instances/app";
import { googleProvider } from "../providers/google.provider";
import { redis } from "../../../utils/databases/redis/connection";
import { ErrorForwarder } from "../../../helpers/error/instances/forwarder";
import { AppError } from "../../../../helpers/error/instances/app";
import { googleProvider } from "../../providers/google.provider";
import { redis } from "../../../../utils/databases/redis/connection";
import { ErrorForwarder } from "../../../../helpers/error/instances/forwarder";
export const googleCallbackService = async (query: {
state: string;

View File

@ -1,7 +1,7 @@
import * as arctic from "arctic";
import { AppError } from "../../../helpers/error/instances/app";
import { googleProvider } from "../providers/google.provider";
import { redis } from "../../../utils/databases/redis/connection";
import { AppError } from "../../../../helpers/error/instances/app";
import { googleProvider } from "../../providers/google.provider";
import { redis } from "../../../../utils/databases/redis/connection";
export const googleRequestService = async () => {
try {

View File

@ -0,0 +1,6 @@
export const loginIfExistAndCreateIfNotService = () => {
/**
* Create auth session if user already exist,
* create user account and give them auth session if not
*/
};