p0t4t0
194
1
Laravel

Is it safe to define Passport client_id and client_secret in .env file?

Posted 11 months ago by p0t4t0

Is it safe to post to /oauth/token via axios with this method?

vue file

axios.post('/oauth/token', {
grant_type: 'password'
client_id: process.env.MIX_PASSPORT_CLIENT_ID,
client_secret: process.env.MIX_PASSPORT_CLIENT_SECRET,
username: this.email,
password: this.password
});

.env file

MIX_PASSPORT_CLIENT_ID="whatever"
MIX_PASSPORT_CLIENT_SECRET="whatever"

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.