Remove the oauth2 hex package and the legacy auth_providers modules
@doc-han is already working on this.
Since Jun 4, 2026.
- Dominant language
- Elixir
- Stars
- 296
- Forks
- 86
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 50
Description
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
oauth2dependency inmix.exs. Lightning.AuthProviders.Handler,Common,Google,Salesforce,OAuthBehaviour. The last three already have zero callers inlib/ortest/.- The cache pieces (
Store,CacheWarmer) that warm a single row from theauth_providerstable. - The
auth_providersDB table. - The login portion of
LightningWeb.OidcController(theshow/2action and the first clause ofnew/2), theauth_handler_url/0button 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
- Land #4702's audit answer.
- Move the popup clauses to a new controller, update
RouteHelpers.oidc_callback_url/0. - Delete the legacy modules, drop the table.
- Remove the
oauth2dep.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.