L o a d i n g
Laravel Sanctum API Broken Issues BackEnd Development

Laravel Sanctum API Broken Issues

** Hey, Lara devs **

Today I am going to share something with you guys.

Maybe someday it will help you to resolve.

I was working with Laravel Project with sanctum.
We were preparing to go live. And I cleaned the full DB and created a new database user and new database at Digital Ocean Droplet with Linux Ubuntu 20.04.

After completing the user & database creation. I imported My Local Fresh SQL to the server new database.

In the meantime somehow id primary key was removed and the data type turn into big int also auto increment credentials were removed.

For that, Records are created without default id increment. ID was 0 for every rows.

So, whenever I was trying to log in through API. It's successfully generating API Tokens also saving inside personal_access_tokens with id 0. I was also able to parse tokens.

When, I was passing the token with Bearer to get my profile information. And, I was getting a wired response like 405 Method Not allowed exception.

I checked locally more than 10 times , everything is working. Also, I tried to down and up Laravel application at production mood.
Nothing worked at all.

After long period, Once I just dropped the id column and created a new id column with primary index & auto increment.
It works perfectly now.

Server : Droplet, Digital Ocean

OS : Ubuntu 20.04

Version : Laravel 7

HappyCoding

clhg52

Auth0

Auth0 now, thank yourself later. 😌

TIL you can do all of this for free with Auth0, plus you now get 5 Organizations for your B2B app.

Try free today