Skip to content

Commit

Permalink
Add include_granted_scopes to CodeClientConfig (#236)
Browse files Browse the repository at this point in the history
* Add include_granted_scopes to CodeClientConfig and TokenClientConfig

* chore: add changeset

---------

Co-authored-by: Jofred Cayabyab <me@jcayabyab.com>
  • Loading branch information
jcayabyab and jcayabyab committed Apr 15, 2023
1 parent 2cb47c9 commit a9832bf
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/strange-files-trade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@react-oauth/google': patch
---

add include_granted_scopes to CodeClientConfig and TokenClientConfig
16 changes: 16 additions & 0 deletions packages/@react-oauth/google/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,14 @@ export interface TokenClientConfig {
*/
scope: string;

/**
* Optional, defaults to true. Enables applications to use incremental authorization to
* request access to additional scopes in context. If you set this parameter's value to
* false and the authorization request is granted, then the new access token will only
* cover any scopes to which the scope requested in this TokenClientConfig.
*/
include_granted_scopes?: boolean;

/**
* Required for popup UX. The JavaScript function name that handles returned code response
* The property will be ignored by the redirect UX
Expand Down Expand Up @@ -291,6 +299,14 @@ export interface CodeClientConfig {
*/
scope: string;

/**
* Optional, defaults to true. Enables applications to use incremental authorization to
* request access to additional scopes in context. If you set this parameter's value to
* false and the authorization request is granted, then the new access token will only
* cover any scopes to which the scope requested in this CodeClientConfig.
*/
include_granted_scopes?: boolean;

/**
* Required for redirect UX. Determines where the API server redirects
* the user after the user completes the authorization flow.
Expand Down

1 comment on commit a9832bf

@vercel
Copy link

@vercel vercel bot commented on a9832bf Apr 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

react-oauth – ./

react-oauth-momensherif.vercel.app
react-oauth-git-master-momensherif.vercel.app
react-oauth.vercel.app

Please sign in to comment.