ivanvermeyen / laravel-google-drive-demo

Laravel & Google Drive Storage - Demo project with Laravel 5.4
403 stars 155 forks source link

Hot to setup credentials that can use in live server only. #76

Closed vishal112logistic closed 4 years ago

vishal112logistic commented 4 years ago

Hello, I have actually 2 setup, and many local setup. Because we are multiple developer working, so many time we just copy and paste of env file. So local setup have same credentials and because of this we are facing some issue.

So is there any way that we can give a URL or IP base restriction so only live instance can access such credentials. I think it is possible by API-key but when i check in this credentials this option is not available.

I don't have much idea about google credentials, please help in this.

ivanvermeyen commented 4 years ago

Hello,

The normal way that OAuth works is:

We are skipping the authorization and redirection part and get the token via the playground, because it's our own Drive that we want to access.

Although you can restrict the redirect URL for when a user clicks the button/link, this has no effect since we are skipping that step. And there doesn't seem to be any other restriction setting for OAuth.