How to setup your own OAUTH2 authentication
- Visit https://console.developers.google.com/ and sign in using your Google Account.
- Click create a project.
- Give the project a Project name.
- Click create. You will be taken to the Project's dashboard.
- On the left pane, select APIs under APIs & Auth.
- Select Drive API.
- On the top of the screen, click the Enable API. The Drive API should now be enabled.
- On the left pane, select Credentials under APIs & Auth.
- Click Create new Cliend ID.
- On the Create Client ID screen, select Installed Application. Click Configure consent screen.
- On the resulting screen, select an email address and enter a product name. Click save.
- You will be taken back to the Create Client ID screen. Selected Installed Application, select Other under Installed Application Type. Click Create Client ID.
- On the screen with the Create new Client ID, your credentials will appear. This is your Client ID and Client secret that you will need to enter into the XBMC / KODI plugin if using Login Type "your own OAUTH2".
- To authorize your login with the OAUTH2, visit the following URL, substituting [CLIENT_ID] with your client ID --
https://accounts.google.com/o/oauth2/auth?scope=https://www.googleapis.com/auth/drive.readonly&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&client_id=[CLIENT-ID]
so that it resembles
https://accounts.google.com/o/oauth2/auth?scope=https://www.googleapis.com/auth/drive.readonly&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&client_id=772521706521-bi11ru1d9h40h1lipvbmp3oddtcgro14.apps.googleusercontent.com