This project is a demonstration of using Google Drive API to access files using NodeJS and JavaScript based on OAuth 2.0. OAuth 2.0 is an authorization framework that enables applications to obtain limited access to user accounts on an HTTP service. OAuth 2.0 provides authorization flows for web and desktop applications, and mobile devices.
A recent version of NodeJS and npm.
Clone this repository Use master branch!
Steps:
- Run
npm install
.- Navigate to
google-oauth-2.0
directory and runnode index.js
.- The app runs on port 3002.
- Open a web browser and navigate to http://localhost:3002/
You can Sign In to the application using a Google account. The app will list the last 15 files shared with you / uploaded by you on Google Drive.
Note:
- You have to allow access to this app when Signing In with Google.
Blog: