@crowdin/app-project-module 0.60.0 → 0.60.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -61,6 +61,7 @@ function handle(config, integration) {
|
|
|
61
61
|
}
|
|
62
62
|
message.data = oauthCredentials;
|
|
63
63
|
if (((_p = integration.oauthLogin) === null || _p === void 0 ? void 0 : _p.mode) === 'polling' && state) {
|
|
64
|
+
yield (0, storage_1.getStorage)().deleteMetadata(state);
|
|
64
65
|
yield (0, storage_1.getStorage)().saveMetadata(state, oauthCredentials);
|
|
65
66
|
}
|
|
66
67
|
return res.render('oauth', { message: JSON.stringify(message), oauthMode: (_q = integration.oauthLogin) === null || _q === void 0 ? void 0 : _q.mode });
|
|
@@ -170,7 +170,7 @@ export interface OAuthLogin {
|
|
|
170
170
|
/**
|
|
171
171
|
* Authorization url getter
|
|
172
172
|
*/
|
|
173
|
-
getAuthorizationUrl?: (redirectUrl: string, loginForm
|
|
173
|
+
getAuthorizationUrl?: (redirectUrl: string, loginForm: any) => string;
|
|
174
174
|
/**
|
|
175
175
|
* Access token url (e.g. https://github.com/login/oauth/access_token)
|
|
176
176
|
*/
|
|
@@ -264,7 +264,9 @@ function constructOauthUrl({ config, integration, clientId, loginForm, }) {
|
|
|
264
264
|
return;
|
|
265
265
|
}
|
|
266
266
|
if (oauth.getAuthorizationUrl) {
|
|
267
|
-
return
|
|
267
|
+
return loginForm
|
|
268
|
+
? oauth.getAuthorizationUrl(`${config.baseUrl}${getOauthRoute(integration)}`, loginForm)
|
|
269
|
+
: undefined;
|
|
268
270
|
}
|
|
269
271
|
if (!oauth.authorizationUrl) {
|
|
270
272
|
return;
|
package/package.json
CHANGED