Skip to content

Conversation

@elias-ba
Copy link
Contributor

@elias-ba elias-ba commented Dec 4, 2025

Testing something that should make working on OAuth locally a bit easier and faster. This is not ready yet !

This adds global OAuth clients for common integrations during demo setup:

Google services:
- Google Drive
- Google Sheets
- Gmail

Salesforce:
- Salesforce (production)
- Salesforce Sandbox

Microsoft services:
- Microsoft SharePoint
- Microsoft Outlook
- Microsoft Calendar
- Microsoft OneDrive
- Microsoft Teams

Features:
- OAuth client credentials are read from environment variables via Bootstrap
- Falls back to dummy placeholder values for development/testing
- Clients are owned by super user if available, otherwise admin
- All clients are global (available across all projects)
- Scopes use full URL format for Google to match token response

Environment variables follow the pattern:
- {SERVICE}_CLIENT_ID
- {SERVICE}_CLIENT_SECRET
@github-project-automation github-project-automation bot moved this to New Issues in v2 Dec 4, 2025
@codecov
Copy link

codecov bot commented Dec 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.81%. Comparing base (5fceb3c) to head (2dd94b6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4134      +/-   ##
==========================================
+ Coverage   88.79%   88.81%   +0.01%     
==========================================
  Files         422      422              
  Lines       19189    19214      +25     
==========================================
+ Hits        17038    17064      +26     
+ Misses       2151     2150       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Add `mix lightning.setup_demo_oauth_clients` task that allows users to
create demo OAuth clients without requiring a database reset.

Features:
- Creates OAuth clients for Google, Salesforce, and Microsoft services
- Skips existing OAuth clients (idempotent operation)
- Supports --email option to specify the OAuth client owner
- Falls back to superuser or first user if no email specified
- Clear output showing created vs skipped clients

This enables adding OAuth clients to existing deployments without
running `mix ecto.reset` or the full demo setup.
@elias-ba elias-ba marked this pull request as draft December 5, 2025 07:29
@elias-ba elias-ba changed the title Add demo OAuth clients for Google, Salesforce, and Microsoft add demo oauth clients Dec 5, 2025
@elias-ba elias-ba changed the title add demo oauth clients demo oauth clients Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New Issues

Development

Successfully merging this pull request may close these issues.

2 participants