diff --git a/src/features/auth/api/config/authApi/authApi.ts b/src/features/auth/api/config/authApi/authApi.ts new file mode 100644 index 0000000..d22eb9c --- /dev/null +++ b/src/features/auth/api/config/authApi/authApi.ts @@ -0,0 +1,19 @@ +import { api as baseApi } from "shared/config"; + +// Extend base API with authentication hooks +export const api = baseApi.extend({ + hooks: { + beforeRequest: [ + (request) => { + // Add authentication token to request headers + return request; + }, + ], + afterResponse: [ + async (request, options, response) => { + // Refresh token logic + return response; + }, + ], + }, +}); diff --git a/src/features/auth/api/config/index.ts b/src/features/auth/api/config/index.ts new file mode 100644 index 0000000..08b45d6 --- /dev/null +++ b/src/features/auth/api/config/index.ts @@ -0,0 +1 @@ +export * from "./authApi/authApi";