koole / react-sanctum

Easily hook up your React app to Laravel Sanctum and Laravel Fortify
MIT License
152 stars 26 forks source link

Old axios version in NPM release #231

Closed kecsot closed 1 year ago

kecsot commented 1 year ago

Hi!

Would be nice to make a release to npm with newer axios. Your library use axios "^0.27.2". Sadly can't use custom axiosInstance with the new axios.

Thank you!

kecsot commented 1 year ago
Type '{ apiUrl: string; csrfCookieRoute: string; signInRoute: string; signOutRoute: string; userObjectRoute: string; axiosInstance: AxiosInstance; }' is not assignable to type 'ConfigProps'.
  The types of 'axiosInstance.defaults.headers.common' are incompatible between these types.
    Type 'Partial<RawAxiosHeaders & { Accept: AxiosHeaderValue; "Content-Length": AxiosHeaderValue; "User-Agent": AxiosHeaderValue; "Content-Encoding": AxiosHeaderValue; Authorization: AxiosHeaderValue; } & { ...; }>' is not assignable to type 'AxiosRequestHeaders'.
      'string' index signatures are incompatible.
        Type 'AxiosHeaderValue | undefined' is not assignable to type 'string | number | boolean'.
          Type 'undefined' is not assignable to type 'string | number | boolean'.

Or there is an another way to use that package?

koole commented 1 year ago

I have published react-sanctum@3.0.0, this now requires the latest axios version.