Skip to content

Commit a9832bf

Browse files
authored
Add include_granted_scopes to CodeClientConfig (#236)
* Add include_granted_scopes to CodeClientConfig and TokenClientConfig * chore: add changeset --------- Co-authored-by: Jofred Cayabyab <me@jcayabyab.com>
1 parent 2cb47c9 commit a9832bf

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

.changeset/strange-files-trade.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@react-oauth/google': patch
3+
---
4+
5+
add include_granted_scopes to CodeClientConfig and TokenClientConfig

packages/@react-oauth/google/src/types/index.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,14 @@ export interface TokenClientConfig {
183183
*/
184184
scope: string;
185185

186+
/**
187+
* Optional, defaults to true. Enables applications to use incremental authorization to
188+
* request access to additional scopes in context. If you set this parameter's value to
189+
* false and the authorization request is granted, then the new access token will only
190+
* cover any scopes to which the scope requested in this TokenClientConfig.
191+
*/
192+
include_granted_scopes?: boolean;
193+
186194
/**
187195
* Required for popup UX. The JavaScript function name that handles returned code response
188196
* The property will be ignored by the redirect UX
@@ -291,6 +299,14 @@ export interface CodeClientConfig {
291299
*/
292300
scope: string;
293301

302+
/**
303+
* Optional, defaults to true. Enables applications to use incremental authorization to
304+
* request access to additional scopes in context. If you set this parameter's value to
305+
* false and the authorization request is granted, then the new access token will only
306+
* cover any scopes to which the scope requested in this CodeClientConfig.
307+
*/
308+
include_granted_scopes?: boolean;
309+
294310
/**
295311
* Required for redirect UX. Determines where the API server redirects
296312
* the user after the user completes the authorization flow.

0 commit comments

Comments
 (0)