Skip to content

Commit

Permalink
Google picker scope (#5535)
Browse files Browse the repository at this point in the history
* fix scope

* set default view type list
  • Loading branch information
mifi authored Dec 4, 2024
1 parent 0648fa7 commit 27c9c73
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export async function authorize({
(resolve, reject) => {
const scopes =
pickerType === 'drive' ?
['https://www.googleapis.com/auth/drive.readonly']
['https://www.googleapis.com/auth/drive.file']
: ['https://www.googleapis.com/auth/photospicker.mediaitems.readonly']

const tokenClient = google.accounts.oauth2.initTokenClient({
Expand Down Expand Up @@ -240,7 +240,8 @@ export async function showDrivePicker({
.setIncludeFolders(true)
// Note: setEnableDrives doesn't seem to work
// .setEnableDrives(true)
.setSelectFolderEnabled(false),
.setSelectFolderEnabled(false)
.setMode(google.picker.DocsViewMode.LIST),
)
// NOTE: photos is broken and results in an error being returned from Google
// I think it's the old Picasa photos
Expand Down

0 comments on commit 27c9c73

Please sign in to comment.