Skip to content

Commit 46d4ca2

Browse files
authored
use 'consent' to get refreshToken (#2414)
* use 'consent' to get refreshToken * Update helpers.test.ts
1 parent e280aed commit 46d4ca2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

backend/src/controllers/mining.helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export function getTokenConfig(provider: OAuthMiningSourceProvider) {
5858
} = {
5959
redirect_uri: `${ENV.LEADMINER_API_HOST}/api/imap/mine/sources/${provider}/callback`,
6060
scope: providerScopes[provider].scopes,
61-
prompt: 'select_account'
61+
prompt: 'consent select_account'
6262
};
6363

6464
if (provider === 'google') {

backend/test/unit/mining-source/helpers.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe('getTokenConfig', () => {
1919
'https://www.googleapis.com/auth/userinfo.email',
2020
'https://www.googleapis.com/auth/userinfo.profile'
2121
],
22-
prompt: 'select_account',
22+
prompt: 'consent select_account',
2323
access_type: 'offline'
2424
});
2525
});
@@ -37,7 +37,7 @@ describe('getTokenConfig', () => {
3737
'openid',
3838
'profile'
3939
],
40-
prompt: 'select_account'
40+
prompt: 'consent select_account'
4141
});
4242
});
4343
});

0 commit comments

Comments
 (0)