1,583 questions
1
vote
1
answer
79
views
How can I enable Client Credentials grant to secure API endpoints?
I'm trying to enable Client Credentials grant to secure API endpoints. I want to create an API between a database and several websites (and SPAs) so I can monitor what website/SPA calls which ...
0
votes
1
answer
92
views
Single Sign On - Laravel Passport
I have multiple Laravel Apps, all with their own user tables and roles tables. I want to implement single sign-on so a user can sign in once and then access all the apps without signing in again. I ...
0
votes
0
answers
70
views
Cookies are missing from request when feature testing in Laravel
My project is using a modified implementation of Laravel Passport for authentication.
I have a route, /auth/login, which I use for authentication. POST is for logging in, PUT is for refreshing tokens, ...
0
votes
2
answers
66
views
How to set file permissions for files generated in Azure web service
Having a Laravel 12, PHP 8.4 and Passport 13 app hosted on a Azure Web Service. In the startup command a .sh files is run. Everything in that works as expected except for the Passport keys. When the ...
0
votes
2
answers
221
views
passport:key and passport:install error in laravel
I created a laravel project from scratch using composer and I am using mysql as my database. I connected my database with my laravel project in the .env file in laravel.
Then I require passport to my ...
0
votes
1
answer
90
views
laravel passport use pkce and approve manulay oauth/authorize
Hello I want to create an authentication system using API with oauth2 pkce and I don't want to use the laravel UI. What suggestions do you have so that I can manually provide the authentication key?
1....
-3
votes
1
answer
175
views
cURL error 28: Operation timed out after 30016 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)
Here is response of api, which showing 500 error, when creating token with passport in laravel. all things as ok and tried many things but not solved.
{
"status": false,
"...
0
votes
1
answer
61
views
socialiteproviders/laravelpassport : getAccessTokenResponse returns null as response
We are using socialiteproviders/laravelpassport for OAUTH2.0 integration and try to authenticate users. The first call return expected code and state values Socialite::driver('laravelpassport')->...
0
votes
1
answer
95
views
Auth check return false in middleware, but should return true with Log Viewer
I installed Log Viewer in my laravel 11 protect, and works like a charm. But i want to limit who has access to the Log Viewer in production.
So,i create a middleware
<?php
namespace App\Http\...
-1
votes
1
answer
175
views
Laravel 11 Passport client credentials grant, problem with setting and validating different scopes for different machines
I was setting up M2M authentication in Laravel 11 using the Laravel Passport package.There is one thing i do not understand:
I created 2 clients with php artisan passport:client
In my app/Providers/...
-5
votes
1
answer
685
views
laravel passport cURL error 28: Operation timed out after 30001 milliseconds with 0 bytes received error
i want to use laravel passport to generate refresh and access tokens
i followed this Article : https://dev.to/mahmudulhsn/laravel-passport-api-authentication-with-access-and-refresh-token-16d0
but ...
0
votes
0
answers
58
views
Laravel passport issue tokens for first party apps outside of Laravel routes
I have a standalone ReactJS app, and I am creating an authentication service in another Laravel app.
This makes this a little bit complicated since I cannot use sessions. Regardless of that, by ...
1
vote
0
answers
155
views
Webauthn expecting userHandle web-auth/webauthn-lib v5
I am trying to now authenticate my users, but it seems like web-auth/webauthn-lib (v5) is now expecting a userHandle even though when it has been set to null?
{"error":"Invalid user ...
-1
votes
2
answers
72
views
Keep the same laravel_session between api requests
I am working on an authentication workflow with Laravel Passport, but the laravel_session cookie changes every time, which is causing issues.
I am not sure how to fix it. And this is what I've tried ...
0
votes
1
answer
77
views
Getting 'unsupported_grant_type' error when implementing a custom OAuth2 grant
I'm trying to implement a custom OAuth2 grant type in Laravel Passport for mobile authentication, but I'm encountering the following error
{
"error": "unsupported_grant_type",
...
-2
votes
1
answer
102
views
Passport password grant response issue
Anyone know to solve this problem?
if i do a post request on url http://127.0.0.1:8000/oauth/token using the parameters directly in postman, it does provides me access token and refresh token. But ...
1
vote
1
answer
142
views
Laravel 11 & Passport - "No Supported Authentication Provider Found for Token" Error
I’m using Laravel 11 with Laravel Passport 11.x to handle API authentication. I’ve set up Passport for OAuth2 authentication and personal access tokens. However, I’m encountering the following error ...
-1
votes
1
answer
44
views
Passport::actingAs($user) is giving a error on unit test
I upgrade my app from laravel 9 to laravel 11, ofcourse that includes the passport, now i have this simple test that has the following
Passport::actingAs($this->user);
$response = $this-&...
0
votes
1
answer
330
views
Laravel Passport: TypeError: Argument #2 ($guard) must be of type Illuminate\Contracts\Auth\StatefulGuard
I'm encountering an error when using Laravel Passport with Laravel version 10.48.22 and Laravel Passport version 12.3.0.
Steps to reproduce:
I moved the predefined application routes to a separate ...
0
votes
1
answer
82
views
Laravel Passport auth api in Reactjs
How to setup API authentication in reactjs using laravel passport? Before this I'm using laravel sanctum, where we need to get csrf cookie first before logging in an user. But I'm did not managed to ...
0
votes
0
answers
421
views
Attempt to read property "secret" on null
I'm trying to develop my first webapp with Laravel so I can practice a bit but I've hit a roadblock right at the beginning. I didn't find anything on google regarding this problem, and I already tried ...
1
vote
1
answer
96
views
issue in Passport v12.3 unsupported_grant_type
I'm using Passport v12.3 in a Laravel project. I encounter an issue whenever I try to check the access_token for any user; I get this error. I've tried many things, but nothing worked. I saw a ...
0
votes
1
answer
114
views
$user->createToken('laravel')->accessToken; is returns "message": "Invalid key supplied"
In My AWS ec2 ubuntu server the login is working properly it gives user login token.
I have moved the files to serverless aws apllication with same ec2 mysql database credentials.
All other apis are ...
2
votes
0
answers
528
views
Invalid key supplied at vendor/league/oauth2-server/src/CryptKey.php in Laravel app
Stack: Laravel 11 - Ubuntu 24.04 - PHP 8.3 - Composer 2.7.1
I pulled a Laravel app from Gitlab and when running composer install I got this error:
Invalid key supplied at vendor/league/oauth2-server/...
1
vote
3
answers
3k
views
Problem with: "Invalid key supplied", exception: "LogicException" (Laravel v10.26.2)
I had a problem, when I deploy my project into Heroku I try to register but this error comes out I try all solving I search for but doesn't help me, I use php artisan:migrate, php artisan passport:...
0
votes
0
answers
71
views
Laravel passport slow query
Im using Laravel 10 (PHP 8.3) with MySQL database. The Laravel apps is deployed on server A, and the MySQL deployed in server B. For the first 3 weeks, the performance is awesome, but per today the ...
-1
votes
1
answer
60
views
Response always Unauthenticated even with correct token in laravel
Im using laravel passport for my authentication, here is my api
Route::post('login', [AuthController::class, 'login']);
// Rute yang Memerlukan Token Akses
Route::middleware('auth:api')->group(...
3
votes
1
answer
372
views
Laravel Passport token request times out
I am using Laravel 11 and need to setup passport for authentication
Installation:
php artisan install:api --passport
Password grand setup
php artisan passport:client --password
The prompt suggested ...
0
votes
1
answer
198
views
Using Laravel Passport (CreateFreshApiToken) To Implement HttpOnly Cookie as Auhentication in API
Im using Laravel Passport and I'm trying to convert my code from using tokens stored in the localhost to using httponly cookies.
I followed this documentation: https://laravel.com/docs/5.8/passport#...
0
votes
1
answer
194
views
In a Laravel Hyn multi-tenant app, registering a new tenancy tries to recreate the tenant database tables, even with existing entries in the tenancy
I am running a Laravel 10 with passport 11 hyn multitenant application. It's a legacy application that is a few years old and has worked very well until I upgraded my Laravel from 9 to 10 and passport ...
1
vote
1
answer
410
views
Laravel Passport loading public and private keys wont work with passport.php config published
I have installed and configured passport and everything seems to be working quite well until I wanted to deploy to serverless (Lambda).
I have generated my keys with artisan passport:install and ...
1
vote
1
answer
410
views
passport authorization of 3rd party app - accessing /oauth/authorize with token based user from front app
i have a website with separate fornt(vue) and backend (laravel) applications
im using passport for authentication , generating personal access token for users and storing it in front application , and ...
1
vote
1
answer
182
views
Route [login] not defined in Laravel 10
working with Laravel 10 and passport authentication. I have following api route list as well
api.php
Route::prefix('v1')->group(function (){
Route::post('/login',[AuthController::class,'login'])...
0
votes
0
answers
64
views
Vue + Laravel Passport auth not work after migrating server
I just migrate server, but the auth is not working.
Auth work in localhost and in postman, but not in application.
Error response is
{"errors":{"email":["Invalid email or ...
1
vote
1
answer
103
views
Problem when using passport::actingAs on tests
using postman:
I can access the route using a client grant from a token obtained in
/oauth/token
I can also access the route using a token from the login user (personal access client)
however, I'm ...
1
vote
1
answer
264
views
Laravel Passport authorize
I am attempting to establish a Single Sign-On (SSO) with Laravel and Laravel/Passport, but I am facing a problem. The /oauth/authorize route returns JSON for an invalid client and a view (the ...
-1
votes
1
answer
544
views
The authorization grant type is not supported by the authorization server in laravel
When I create access_token and refresh_token using Laravel 11 passport then the following error occurs:
unsupported_grant_type","error_description":"The authorization grant type ...
3
votes
0
answers
187
views
How to test the token revocation for Laravel Passport with PestPHP?
I have followed this answer for logging out from a Laravel Passport API. I would like to test the method I have written, but I keep bumping into this SQL error when running sail pest tests/Feature/...
8
votes
1
answer
18k
views
Laravel Passport gives me "Invalid key supplied"
Im am trying to make login functionality using Laravel 11, Laravel Passport and TanancyForLaravel, but i get the following error:
Invalid key supplied
I want to create login functionality for users at ...
0
votes
1
answer
166
views
How to securely migrate MD5 hashed passwords to bcrypt on user's first login with Laravel Passport?
I have a Laravel application where I've recently migrated users from an old system. The passwords in the old system were hashed using MD5.
I've successfully implemented a solution using Laravel ...
0
votes
1
answer
65
views
laravel passport - issue token return whether new user was created
I'm using Laravel 9 Passport. On the front-end after a user signs into a social account, I"m passing the provider info to the Auth issueToken method. I'd like to return if a new account was ...
1
vote
0
answers
133
views
Laravel Passport cannot assign client because field 'id' doesn't have a default value
I'm following a tutorial from this at that exact time, he can easily create a laravel passport client without getting error
Illuminate\Database\QueryException
SQLSTATE[HY000]: General error: 1364 ...
1
vote
0
answers
195
views
Laravel Passport's OAuthServerException does not bubbles up to Handler.php. League's OAuthServerException bubbles up instead
I am using Laravel Passport's Authorization Code Grant to authenticate users.
I want to return a JSON response if the access token is expired when accessing an "auth:api" middleware ...
0
votes
0
answers
120
views
Correct way to handle email/password sign up, in addition to using Laravel Socialite for OAuth?
I'm building an iOS app with Laravel backend.
I'm using Firebase Authentication to handle the following authentication types: Google, Apple, and email/password sign up.
I've set up Google and Apple ...
0
votes
0
answers
129
views
Laravel Session Timeout on Login
I have an SPA app that uses Laravel Passport. For the web, I am using sessions. If I set my session.lifetime to 5 minutes, sit on the login page for 5 minutes, and then login, I receive a 419 (...
0
votes
0
answers
93
views
Phpunit Tests on Laravel Passport (Lumen) failing for an API service
I have a lumen microservice on lumen 10 using https://github.com/wadaahmad/lumen-passport.
I have installed passport and configured it with a custom logic and everything is working as expected but my ...
3
votes
0
answers
254
views
How do you setup Laravel Passport so it returns JWTs for multiple types of authentication?
so I am stuck on this for several days now. My ultimate goal is to break down an old monolith application into a micro-service architecture and the very 1st step is to extract quite complex ...
0
votes
1
answer
62
views
How to prevent existing tokens from being revoked when updating Laravel 5 to 7?
I was using Laravel 5.8, which included many unnecessary libraries. Therefore, I decided to create a new project using Laravel 7.30.6 and copied all the necessary files.
Everything seems to work ...
0
votes
0
answers
128
views
Laravel Passport hashed client_id
I´ve just started Laravel Passport and noticed something weird that has not been in any tutorial. After I run php artisan passport:install, it shows my client ID as a long hash. But normally, it ...
1
vote
1
answer
116
views
Laravel passport after deployment
I run a laravel App on a aws ec2 instance and use laravel passport to secure my api with Bearer tokens.
After each deployment the passport keys are gone so i added a passport:install command after ...