Category "laravel-sanctum"

Laravel sanctum vue spa being blocked when using ip address

I know a lot has been documented on about laravel sanctum configuration to avoid blocked requests from your spa frontend, but something that is not quite clear

Autheticate via Laravel Sanctum by passing token as a GET query parameter

I know the dangers of passing the token as a GET parameter. I've seen this and this. However, in my case there is no other way because the route will get called

Laravel Sanctum unauthenticated using postman

I follow the Laravel official document step by step. When I send a request to {{host}}/api/login, I can receive the response that includes token. EVerything is

Laravel Sanctum throws 401 Unauthenticated when using Postman

I have problem with Laravel Sanctum. My dev environment is located in subdomain. All my API routes are prefixed with /api. Here are my settings: .env APP_URL=ht

Is Laravel Sanctum suitable to give API access to Third-party server?

We built an API (which currently contains just a single route) to give access to specific data to another company we are working with. The API calls this other

Laravel Sanctum CSRF not authenticating

I have a problem understanding use of CSRF tokens with Laravel/Sanctum. As I see, there is no need to create Sanctum API token to authenticate user, and conside

Retrieve user by Sanctum plainTextToken

How to retrieve the 'logged in' user from a Sanctum token. For logging in I have the following method public function login(Request $request) { if (Auth::at

Retrieve user by Sanctum plainTextToken

How to retrieve the 'logged in' user from a Sanctum token. For logging in I have the following method public function login(Request $request) { if (Auth::at

NuxtJs app returns 401 after log in with laravel sanctum

I'm trying to build a PWA with NuxtJS and Laravel is in the backend for the API. I use Laravel Sanctum for API auth and also I have NuxtJS auth module, I can lo

Should we make a request to /sanctum/csrf-cookie first, before registration that logs in a user after a successful registration?

My SPA is in the same repository as my laravel application and the documentation states that when using sanctum, your SPA's "login" page should first make a req

Laravel SPA (Vue) Authentication with cookie or token?

the more I read about Laravel Spa (Vue) authentication, the more I ask myself about the "best way" to authenticate with Sanctum. Official Laravel documentation

Impersonate users with Sanctum

I'm implementing a simple impersonation system for Laravel with Sanctum. Earlier I used Tymondesigns/jwt-auth with Rickycezar/laravel-jwt-impersonate, but we re

laravel sanctum Route [login] not defined

I am trying to get the current user in my laravel vue application. And whenever I trie to get it i am getting this error: Symfony\Component\Routing\Exception\Ro

Issue with POST requests with Laravel Sanctum and Postman

I have a problem with Sanctum and Postman that's related to this post: SPA Authentication Issues with Sanctum and Postman I followed everything from the Laravel

Authenticate my ReactJS SPA with laravel/sanctum using Axios

After a successful authentication (login + token), I'm still unable to request auth:sanctum routes and I get the following response: Docs ... This token shoul

How to access Sanctum package in custom laravel package

i want to access laravel sanctum auth which is working fine in project routes I'm making a custom package of api's which needs to use same sanctum authenticatio

Redirected to login after refreshing page in nuxtjs and laravel sanctum

i have a problem with Nuxt SSR mode in production auth with Laravel sanctum login success but when refresh any page, redirecting to login page and logout !!!