Create an axios instance preconfigured for token-authenticated APIs.
The returned client sends JSON, attaches Authorization: Bearer <token>
from tokenStore to every request, and clears the token plus emits
auth:unauthorized on any 401 response.
Use this for any backend that shares the same login as the auth server; for
unauthenticated endpoints a plain axios instance is fine.
Parameters
baseURL: string
Root URL prefixed to every request (for example
"https://api.example.com").
Create an axios instance preconfigured for token-authenticated APIs.
The returned client sends JSON, attaches
Authorization: Bearer <token>fromtokenStoreto every request, and clears the token plus emitsauth:unauthorizedon any401response.Use this for any backend that shares the same login as the auth server; for unauthenticated endpoints a plain axios instance is fine.