🏗️ separate http and internal service
separate between internal and http service due security concern in auth module
This commit is contained in:
@ -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 {
|
||||
@ -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 {
|
||||
@ -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;
|
||||
@ -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 {
|
||||
@ -0,0 +1,6 @@
|
||||
export const loginIfExistAndCreateIfNotService = () => {
|
||||
/**
|
||||
* Create auth session if user already exist,
|
||||
* create user account and give them auth session if not
|
||||
*/
|
||||
};
|
||||
Reference in New Issue
Block a user