feat(integrations): add per-user OAuth wizard with user-mode for Dropbox, OneDrive, Google Drive
- Add user_mode to dropbox/onedrive/google_drive setup views that loads integration config - Show user-friendly auth wizard when integration_id is provided (user mode) - In user mode: show integration name, current folder, back-to-integrations link - In callback templates: only save credentials (not config) for user integrations - In integrations dashboard: show Authorize/Re-Authorize button for all OAuth types - Add WATCH_FOLDER OAuth support: detect source_type in config for auth button - isOAuthType() and oauthLink() now accept full integration object Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
@@ -145,11 +145,10 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
app_key: appKey,
|
||||
app_secret: appSecret,
|
||||
};
|
||||
const cfgUpdate = {};
|
||||
if (folderPath) cfgUpdate.folder = folderPath;
|
||||
|
||||
// Only send credentials — the integration's config (folder, source_type, etc.)
|
||||
// is already set and must not be overwritten here.
|
||||
const body = { credentials: creds };
|
||||
if (Object.keys(cfgUpdate).length > 0) body.config = cfgUpdate;
|
||||
|
||||
document.getElementById('processing-message').innerHTML =
|
||||
'<p>Saving credentials to your integration...</p>';
|
||||
|
||||
Reference in New Issue
Block a user