Skip to content

[13.x] Fix "Undefined property $oauth_access_token_id error" #1828

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

ysfks
Copy link

@ysfks ysfks commented Jun 12, 2025

Resolves #1827

This PR fixes Undefined property $oauth_access_token_id error when using Passport::actingAs(....) on tests

testing.ERROR: Undefined property: Laravel\Passport\AccessToken::$oauth_access_token_id {"userId":22,"exception":"[object] (ErrorException(code: 0): Undefined property: Laravel\\Passport\\AccessToken::$oauth_access_token_id at /var/www/vendor/laravel/passport/src/AccessToken.php:95)
[stacktrace]
#0 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(256): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError()
#1 /var/www/vendor/laravel/passport/src/AccessToken.php(95): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->{closure:Illuminate\\Foundation\\Bootstrap\\HandleExceptions::forwardsTo():255}()
#2 /var/www/vendor/laravel/passport/src/AccessToken.php(145): Laravel\\Passport\\AccessToken->getToken()
#3 /var/www/vendor/laravel/passport/src/AccessToken.php(87): Laravel\\Passport\\AccessToken->__get()
#4 /var/www/app/Domains/Profile/Jobs/RevokeTokenJob.php(13): Laravel\\Passport\\AccessToken->revoke()

@ysfks ysfks deleted the bugfix/add-oauth-access-token-id-to-acting-as branch June 13, 2025 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Undefined property: Laravel\Passport\AccessToken::$oauth_access_token_id
2 participants