Skip to content

refactor: remove unused modules#4825

Open
doc-han wants to merge 1 commit into
4621-full-sso-experiencefrom
remove-unused-packages
Open

refactor: remove unused modules#4825
doc-han wants to merge 1 commit into
4621-full-sso-experiencefrom
remove-unused-packages

Conversation

@doc-han
Copy link
Copy Markdown
Contributor

@doc-han doc-han commented Jun 2, 2026

Description

This PR removes legacy auth-provider modules that became dead code once the new SSO handler architecture landed.

Closes #4723

Validation steps

  1. mix compile --warnings-as-errors (no warnings about missing/unused modules).
  2. mix test test/lightning_web/live/credential_live_test.exs (credential OAuth tests pass against the updated assertions).
  3. mix credo --strict --all and mix dialyzer.

AI Usage

Please disclose whether you've used AI anywhere in this PR (it's cool, we just
want to know!):

  • I have used Claude Code
  • I have used another model
  • I have not used AI

You can read more details in our
Responsible AI Policy

Pre-submission checklist

  • I have performed an AI review of my code (we recommend using /review
    with Claude Code)
  • I have implemented and tested all related authorization policies.
    (e.g., :owner, :admin, :editor, :viewer)
  • I have updated the changelog.
  • I have ticked a box in "AI usage" in this PR

@github-project-automation github-project-automation Bot moved this to New Issues in Core Jun 2, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.4%. Comparing base (6883427) to head (39d763a).

Additional details and impacted files
@@                    Coverage Diff                     @@
##           4621-full-sso-experience   #4825     +/-   ##
==========================================================
+ Coverage                      90.2%   90.4%   +0.2%     
==========================================================
  Files                           447     444      -3     
  Lines                         22735   22656     -79     
==========================================================
- Hits                          20507   20486     -21     
+ Misses                         2228    2170     -58     

☔ View full report in Codecov by Harness.
📢 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.

@doc-han doc-han requested review from elias-ba and stuartc June 4, 2026 08:42
@doc-han doc-han marked this pull request as ready for review June 4, 2026 08:42
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2026

Now I have enough context to produce the security review. The PR's substantive new content is SSO/account-level changes (the workflow_channel.ex diff in my view is reversed recent main commits not yet in the branch — they aren't introduced by this PR).

Security Review ✅

  • S0 (project scoping): N/A — all new code is account/auth-layer (SSO identity linking, signup confirmation, new GitHub/Google handlers in lib/lightning_web/controllers/oidc_controller.ex:50-313, lib/lightning/accounts.ex:175-296); no project-scoped resources (dataclips, runs, workflows, etc.) are queried or mutated.
  • S1 (authorization): PASS — link/2 gates on conn.assigns.current_user before stashing intent (oidc_controller.ex:38); unlink-identity operates on socket.assigns.user derived from @current_user in the profile LiveView (identities_component.ex:19, profile_live/components.ex:67-70) which already sits behind require_authenticated_user; signup confirmation uses session-stashed state (@pending_signup_session_key), never trusting client-supplied user IDs; the email-collision branch in handle_sso_login refuses to auto-link an unverified provider identity to an existing account (oidc_controller.ex:226-234).
  • S2 (audit trail): N/A — user-identity linking is an account-level action, not project/instance configuration, and matches no existing audit module (credentials, projects, workflows, webhook_auth_method, oauth_client, version_control, dataclip, export).

Copy link
Copy Markdown
Member

@stuartc stuartc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice dude, all good from my side, we do need to drop the dead SALESFORCE_CLIENT_* lines from .env.example and Salesforce section on DEPLOYMENT.md, up to you if you want to do it in this PR or not. Let me know if/when you want me to merge this.

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