1
votes

I'm trying to connect nuxtjs to laravel passport api. I want nuxt to be able to send api without needing the user to login. So i would have to use the "Client Credentials Grant Tokens" right? I've registered nuxt in laravel passport as a client. The problem is, where is the best place to store the client secret and id in nuxt to make request for access token? I know that sanctum is much suitable but I'd like to know if there is a solution. Thanks

1

1 Answers

0
votes

The best place to keep your secret keys and/or mostly used variables that you don't want in your code would be .env file (you can do this in node, just in case you didn't know). Check the link below:

https://www.stackhero.io/en/documentations/nodejs/handle-your-secrets