Support the ongoing development of Laravel.io →
Authentication Laravel Sanctum

I have a problem when I want to authenticate myself with Laravel Sanctum, when I generate a login the record of the creation and update dates in the personal_access_tokens table saves them with #Y:d:m format, apparently this means that when you want to send the token, the system it takes it as expired, returning the message "Unauthenticated", this only happens with SQL Server, in MySql the dates are saved correctly with the Y:m:d format, how can I solve it?

Steps To Reproduce: $user->createToken('auth_token')->plainTextToken;

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.