Skip to content

Commit a6555d4

Browse files
authored
fix: using install link for monday (#222)
1 parent 91b39fe commit a6555d4

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vesselapi/integrations",
3-
"version": "1.0.17",
3+
"version": "1.0.18",
44
"description": "Vessel integrations",
55
"main": "dist/index.js",
66
"module": "dist/index.mjs",

src/platforms/monday/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ export * as types from './schemas';
1414

1515
export default platform('monday', {
1616
auth: [
17-
auth.apiToken({
18-
default: true,
19-
}),
17+
auth.apiToken({}),
2018
auth.oauth2({
19+
default: true,
2120
authUrl: `https://auth.monday.com/oauth2/authorize`,
21+
authUrlQuery: { response_type: 'install' },
2222
tokenUrl: `https://auth.monday.com/oauth2/token`,
2323
tokenAuth: 'body',
2424
isRetryable: async ({ status }) => status === 401,

src/sdk/auth.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export const auth = {
2525
authUrl:
2626
| HttpsUrl
2727
| OAuth2AuthConfig<TAnswers, z.infer<TOAuthAppConfigSchema>>['authUrl'];
28+
authUrlQuery?: Record<string, string | number>;
2829
tokenUrl:
2930
| HttpsUrl
3031
| OAuth2AuthConfig<TAnswers, z.infer<TOAuthAppConfigSchema>>['tokenUrl'];
@@ -70,6 +71,7 @@ export const auth = {
7071
scope: scopes.join(options.scopeSeparator ?? ' '),
7172
state,
7273
response_type: 'code',
74+
...(options.authUrlQuery ?? {}),
7375
};
7476
return `${
7577
isFunction(options.authUrl)

0 commit comments

Comments
 (0)