From 1fe4e08204b32032994398f48f0da70a0793d11e Mon Sep 17 00:00:00 2001 From: radudiaconu0 <52667211+radudiaconu0@users.noreply.github.com> Date: Wed, 7 Apr 2021 15:13:39 +0300 Subject: [PATCH] Update echo.ts Solving Unauthorized error --- src/runtime/echo.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/echo.ts b/src/runtime/echo.ts index 7155b94..8ef46c0 100644 --- a/src/runtime/echo.ts +++ b/src/runtime/echo.ts @@ -36,7 +36,7 @@ export class Echo extends BaseEcho { if (strategy.options.name === 'laravelSanctum') { headers.referer = location.origin - headers['X-XSRF-TOKEN'] = this.ctx.app.$auth.$storage.getCookies()['XSRF-TOKEN'] + headers.Authorization = 'Bearer' + this.ctx.app.$auth.$storage.getCookies()['XSRF-TOKEN'] } else { const tokenName = strategy.options.token.name || 'Authorization' const token = strategy.token.get()