Skip to content

Remove the oauth2 hex package and the legacy auth_providers modules #4723

@elias-ba

Description

@elias-ba

The oauth2 hex package is only used today by an older OIDC login implementation under lib/lightning/auth_providers/. The credential OAuth flow has been on Tesla (via OauthHTTPClient) for a while. This ticket retires the package once the audit in #4702 confirms no one's using the per-instance OIDC login in production.

What to remove

  • The oauth2 dependency in mix.exs.
  • Lightning.AuthProviders.Handler, Common, Google, Salesforce, OAuthBehaviour. The last three already have zero callers in lib/ or test/.
  • The cache pieces (Store, CacheWarmer) that warm a single row from the auth_providers table.
  • The auth_providers DB table.
  • The login portion of LightningWeb.OidcController (the show/2 action and the first clause of new/2), the auth_handler_url/0 button on /users/log_in, and the admin LiveView at /settings/authentication.

What to keep

The other two clauses of OidcController.new/2 handle the popup callback for the credential OAuth flow at /authenticate/callback. They're alive and OauthHTTPClient depends on them. Move them to a clearer module before deleting OidcController.

Order

  1. Land Decide what to do about the existing per-instance identity provider in production #4702's audit answer.
  2. Move the popup clauses to a new controller, update RouteHelpers.oidc_callback_url/0.
  3. Delete the legacy modules, drop the table.
  4. Remove the oauth2 dep.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Full SSO ExperienceTracking work under the Full SSO Experience epic

    Type

    No type

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions