All Questions
Tagged with laravel-sanctum laravel-8
63
questions
1
vote
0
answers
115
views
Request failed with status code 419 -Nextjs and Laravel Sanctum
I have two projects, Laravel 8 and Next.js. Everything works smoothly when I send a GET request, but I encounter an error when I send a POST request. I've attempted various solutions, but the issue ...
0
votes
1
answer
48
views
401 Unauthenticated error while using laravel sanctum
I'm using laravel framework version 8.54 and sanctum version 2.15
Creating apis
Login and get User
On local environment it works fine but on production it return 401 error
Configurations
Added ...
0
votes
0
answers
89
views
Laravel Sanctum Login And Register API with React js
I have a created my api in laravel using sanctum for user login and register and am getting this error
xhr.js:258
POST http://jaano.test/api/login 419 (unknown status)
settle.js:19 Uncaught (in ...
1
vote
0
answers
77
views
Error 401 Unauthorized - Laravel Sanctum + Oracle 11g Bearer Token in Docker
I am using Laravel v8, Laravel Sanctum v2.15, Oracle 11g, Linux Production Server which contains a Docker to use PHP 8.0.30. and oci8 v3.0.1
The backend is made with Laravel 8 by creating an API using ...
0
votes
0
answers
129
views
Laravel 8 – API deploy in live server problem
I’m fairly new to Laravel and this post is mostly for learning purposes, so don’t mind the rudimentary approach, architecture and deploy method I’m using here. Also, it’s the first time I attempt to ...
0
votes
1
answer
122
views
tokenCan() method undefined
I am currently following this tutorial,
https://nothingworks.netlify.app/blog/laravel-sanctum-multi-auth/
However when creating the middleware, the tokenCan method is undefined.
<?php
namespace ...
0
votes
2
answers
2k
views
Laravel 8 – Sanctum Personal Access Token – Web Route Secure With Redirect
One part of the goal here is to deepen my knowledge about the framework, so even if this isn’t “the right way”, I’d still like to try a solution to check if I should proceed with sanctum or passport.
...
1
vote
1
answer
2k
views
Laravel 8 Sanctum Authentication Token With Custom Model Returning Integrity constraint violation: 1048 Column 'tokenable_id' cannot be null error
I have low experience with token authentication and sanctum.
General Context:
I’m currently migrating a framework of mine to Laravel and still in the early stages. I know that Laravel has its own ...
0
votes
2
answers
1k
views
Laravel Authentication API Sanctum – With Custom Database
First important information: I’m new to Laravel, so your patience is appreciated.
I’m currently migrating a framework of mine to Laravel and still in the early stages. I know that Laravel has it’s own ...
0
votes
1
answer
728
views
Argument 2 passed to Illuminate\\Auth\\SessionGuard::__construct() must implement interface Illuminate\\Contracts\\Auth\\UserProvider [duplicate]
This is my auth.php file
return [
'defaults' => [
'guard' => 'salon_emp',
// 'passwords' => 'users',
],
'guards' => [
'web' => [
'...
0
votes
1
answer
128
views
how to config sanctum laravel
I try to access by wrong token in sanctum laravel but it return
The GET method is not supported for this route. Supported methods: POST instead of message: unauthorized. how can I solve this ?
This is ...
0
votes
1
answer
340
views
Laravel API Testing always returning middleware error
I have created laravel backend related few of end points. how ever when I trying to test it using unit testing always returning 'Get the application's route middleware groups' error. Please help me to ...
0
votes
2
answers
108
views
Still getting data after expire SANCTUM
Hi I edit the config/sanctum.php , I add a value for 1 min, to test if I will get an error after expiration. when I send a request after 3 mins from my SPA app, I was able to get the details. I ...
1
vote
1
answer
927
views
Error creating token with Laravel Santum when tokenable morph uses UUIDs
I am having problems when generating tokens with laravel sanctum.
The error claims that the value is out of range for the column 'tokenable_id'.
Here textual:
SQLSTATE[HY000]: General error: 1366 ...
1
vote
1
answer
2k
views
Creating auth tokens for a custom model that is not the default User model
How do I create access/api/auth tokens for a different model? From most questions, docs, or tutorials, most are using the default User model.
I read the default doc but it doesn't really say where to ...