[[axios]]で[[Bearer認証]]を行う方法。READMEに以下の記述がある。 ```js // `auth` indicates that HTTP Basic auth should be used, and supplies credentials. // This will set an `Authorization` header, overwriting any existing // `Authorization` custom headers you have set using `headers`. // Please note that only HTTP Basic auth is configurable through this parameter. // For Bearer tokens and such, use `Authorization` custom headers instead. auth: { username: 'janedoe', password: 's00pers3cret' }, ``` > For Bearer tokens and such, use `Authorization` custom headers instead. [[Authorizationヘッダー]]をカスタムヘッダとして指定する必要がある。以下のような感じ。 ```js $axios.$get<Response>(`https://hogehoge`, { headers: { Authorization: `Bearer ${token}`, }, }) ```