Browse Source

feat: add AuthBridge for Flutter communication and configure Axios http client with proxy support and token authentication

front-test-2
ghorbani 4 weeks ago
parent
commit
4867462c8e
  1. 2
      src/lib/auth-bridge.ts
  2. 2
      src/lib/http.ts

2
src/lib/auth-bridge.ts

@ -209,7 +209,7 @@ class AuthBridge {
return (
getClientCookie(TOKEN_COOKIE_NAME) ??
getClientCookie("habib_token") ??
"0b55485e6dddb6f24bf14acde5f21edde8792f13"
"15c4187abbfbe56f932268b02413e2e8987f5338"
);
}

2
src/lib/http.ts

@ -73,7 +73,7 @@ http.interceptors.request.use((config) => {
const token =
authBridge.getToken() ??
getClientCookie("HABIB_TOKEN") ??
"0b55485e6dddb6f24bf14acde5f21edde8792f13";
"15c4187abbfbe56f932268b02413e2e8987f5338";
if (token) {
config.headers.Authorization = `Token ${token}`;

Loading…
Cancel
Save