Skip to content

Commit 3530650

Browse files
author
Clément Denis
authored
Code review updates
- Use Session.getEffectiveUser() instead of Session.getActiveUser() - Restore blank lines - Wording update
1 parent 71064af commit 3530650

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,13 @@ function getDriveService() {
124124

125125
// Sets the login hint, which will prevent the account chooser screen
126126
// from being shown to users logged in with multiple accounts.
127-
// Prefer Session.getEffectiveUser().getEmail() if used in add-ons.
128-
.setParam('login_hint', Session.getActiveUser().getEmail())
127+
.setParam('login_hint', Session.getEffectiveUser().getEmail())
129128

130129
// Requests offline access.
131130
.setParam('access_type', 'offline')
132-
// This param is required to ensure a refresh token is always returned.
131+
132+
// Consent prompt is required to ensure a refresh token is always
133+
// returned when requesting offline access.
133134
.setParam('prompt', 'consent');
134135
}
135136
```

0 commit comments

Comments
 (0)