qirolab / nuxt-sanctum-authentication

Nuxt 3 module for seamless Laravel Sanctum authentication with SSR support.
https://qirolab.github.io/nuxt-sanctum-authentication/
24 stars 1 forks source link

add option for token key in login response #3

Closed kurorido closed 1 month ago

kurorido commented 1 month ago

Laravel Resource response generally wrap in the data key.

We're heavily following Resource convention in Laravel, that's why we need to define the token key as "data.token" in the login response.

References: https://laravel.com/docs/11.x/eloquent-resources

hkp22 commented 1 month ago

Thanks for the contribution!