Skip to content

Commit a259dae

Browse files
committed
chore: bump auth0-spa-js to support scopes parameter for connected accounts
1 parent b93de35 commit a259dae

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

EXAMPLES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -658,9 +658,9 @@ const ConnectAccount = () => {
658658
const { connectAccountWithRedirect } = useAuth0();
659659
return <button onClick={() => connectAccountWithRedirect({
660660
connection: '<CONNECTION eg, google-apps-connection>',
661-
access_type: 'offline', // You must also request a refresh token from the third party Identity Provider for it to be stored in Token Vault.
661+
scopes: ['<SCOPE eg https://www.googleapis.com/auth/calendar.acls.readonly>'],
662662
authorization_params: {
663-
scope: '<SCOPE eg https://www.googleapis.com/auth/calendar.acls.readonly>'
663+
// additional authorization params to forward to the authorization server
664664
}
665665
})}>Connect Google Calendar</button>;
666666
};

src/auth0-context.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ export interface Auth0ContextInterface<TUser extends User = User>
126126
* ```js
127127
* await connectAccountWithRedirect({
128128
* connection: 'google-oauth2',
129+
* scopes: ['openid', 'profile', 'email', 'https://www.googleapis.com/auth/drive.readonly'],
129130
* authorizationParams: {
130-
* access_type: 'offline',
131-
* scope: 'openid profile email https://www.googleapis.com/auth/drive.readonly',
131+
* // additional authorization params to forward to the authorization server
132132
* }
133133
* });
134134
* ```

0 commit comments

Comments
 (0)