feat: read only gdrive access
This commit is contained in:
@@ -173,7 +173,11 @@ const oauth2Client = new google.auth.OAuth2(
|
|||||||
|
|
||||||
// Step 1: Redirect to Google for authentication
|
// Step 1: Redirect to Google for authentication
|
||||||
router.get('/google', (req, res) => {
|
router.get('/google', (req, res) => {
|
||||||
const scopes = ['https://www.googleapis.com/auth/spreadsheets', 'https://www.googleapis.com/auth/userinfo.email'];
|
const scopes = [
|
||||||
|
'https://www.googleapis.com/auth/spreadsheets',
|
||||||
|
'https://www.googleapis.com/auth/userinfo.email',
|
||||||
|
'https://www.googleapis.com/auth/drive.readonly',
|
||||||
|
];
|
||||||
const url = oauth2Client.generateAuthUrl({
|
const url = oauth2Client.generateAuthUrl({
|
||||||
access_type: 'offline',
|
access_type: 'offline',
|
||||||
prompt: 'consent', // Ensures you get a refresh token on first login
|
prompt: 'consent', // Ensures you get a refresh token on first login
|
||||||
|
|||||||
Reference in New Issue
Block a user