feat: gdrive export frontend service integration#5251
Open
Sentiaus wants to merge 7 commits into
Open
Conversation
… DB schema - Add user_oauth_token table to store encrypted OAuth refresh tokens per provider - Add TokenEncryptionService using jose4j AES-256-GCM for encrypting auth blobs - Add AuthConfig.encryptionSecretKey reading from auth.encryption.256-bit-secret - Add GoogleDriveAuthResource with /connect, /callback, and /token endpoints - Add GoogleAuthResource config endpoint exposing client ID and redirect URI - Add DriveTokenIssueResponse and GoogleAuthConfigResponse HTTP models - Wire GoogleDriveAuthResource into TexeraWebApplication and GuestAuthFilter - Add google.client-id, client-secret, and app-domain to UserSystemConfig - Update k8s values with new config keys Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nd error case Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5251 +/- ##
============================================
- Coverage 48.95% 48.95% -0.01%
Complexity 2377 2377
============================================
Files 1048 1048
Lines 40270 40269 -1
Branches 4272 4272
============================================
- Hits 19714 19713 -1
Misses 19402 19402
Partials 1154 1154
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ogleDriveAuthResource OAuth state is now a UUID stored in a ConcurrentHashMap with a 10-minute TTL, consumed exactly once on callback. Removes JwtParser/JwtAuth dependency from the Drive resource and avoids encoding user info in the callback URL. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rive - Add DriveService to manage Drive token retrieval, OAuth connection, and file export - Add GoogleDriveConnectComponent as the OAuth callback landing page - Add /gdrive-connect route to the app router - Inject gapi and Google Identity Services scripts into index.html Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
Adds the frontend service layer for Google Drive integration. No UI surfaces are changed in this PR — those are in the follow-up.
DriveService(drive.service.ts): New injectable service with four responsibilities:getToken()— callsGET /api/auth/google/drive/tokenand returns the connection status and short-lived access tokenconnect(reauth?)— opens a popup to the/connectURL; emits ononConnected()when the OAuth flow completesonConnected()— observable that fires when the popup posts agdrive-connectedwindow messageexportToDrive(blob, fileName)— opens the Google Picker folder selector, then uploads the blob to the chosen folder via the Drive multipart upload APIGoogleDriveConnectComponent: OAuth callback landing page at/gdrive-connect. Receives the authorization code from Google's redirect, posts agdrive-connectedmessage to the opener window, and closes itself.Routing: Adds
/gdrive-connectto the app router pointing atGoogleDriveConnectComponent.index.html: Injects the gapi and Google Identity Services scripts needed by the Picker API.Any related issues, documentation, discussions?
Closes #4240 (partial — UI wiring in follow-up PR)
How was this PR tested?
Unit tests in
drive.service.spec.tsandgoogle-drive-connect.component.spec.tscovering:getToken()returns status and access tokenconnect()opens a popup andonConnected()emits on message receiptexportToDrive()calls the Drive multipart upload API and resolvesWas this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Sonnet 4.6