refactor: implement automatic token refresh and credential support for auth API client

This commit is contained in:
Your Name
2026-04-10 18:34:28 +05:30
parent 867839f896
commit a0eec02ee4
4 changed files with 27 additions and 7 deletions
+2 -2
View File
@@ -5,7 +5,7 @@ import { useState } from "react";
import { useForm } from "react-hook-form";
import { useNavigate } from "react-router-dom";
import { z } from "zod";
import apiClient from "../api/apiClient";
import authApiClient from "../api/apiClient";
import Logo from "../components/Logo";
import FormField from "../components/ui/FormField";
@@ -41,7 +41,7 @@ export default function Register() {
setIsLoading(true);
setApiError(null);
try {
await apiClient.post("/register/", {
await authApiClient.post("/register/", {
full_name: data.full_name,
email: data.email,
password: data.password,