From be88e4e8933fdf1805192c5c8c8e4c2e606416ef Mon Sep 17 00:00:00 2001 From: DaneEveritt Date: Sun, 22 May 2022 17:01:39 -0400 Subject: [PATCH] Ignore migrations, pass credentials --- app/Providers/AuthServiceProvider.php | 8 +++++--- resources/scripts/api/http.ts | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 76ac26f37..cc06f944f 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -19,13 +19,15 @@ class AuthServiceProvider extends ServiceProvider Server::class => ServerPolicy::class, ]; - /** - * Register any application authentication / authorization services. - */ public function boot() { Sanctum::usePersonalAccessTokenModel(ApiKey::class); $this->registerPolicies(); } + + public function register() + { + Sanctum::ignoreMigrations(); + } } diff --git a/resources/scripts/api/http.ts b/resources/scripts/api/http.ts index 9f810b648..cf1514274 100644 --- a/resources/scripts/api/http.ts +++ b/resources/scripts/api/http.ts @@ -2,6 +2,7 @@ import axios, { AxiosInstance } from 'axios'; import { store } from '@/state'; const http: AxiosInstance = axios.create({ + withCredentials: true, timeout: 20000, headers: { 'X-Requested-With': 'XMLHttpRequest',