Home / Function/ filterOAuthApps() — supabase Function Reference

filterOAuthApps() — supabase Function Reference

Architecture documentation for the filterOAuthApps() function in oauthApps.utils.ts from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  1f339641_26f9_a527_6ef9_513d5304cef6["filterOAuthApps()"]
  726abde8_eb5f_57a2_7d63_0eb5c9205822["OAuthAppsList()"]
  726abde8_eb5f_57a2_7d63_0eb5c9205822 -->|calls| 1f339641_26f9_a527_6ef9_513d5304cef6
  style 1f339641_26f9_a527_6ef9_513d5304cef6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/studio/components/interfaces/Auth/OAuthApps/oauthApps.utils.ts lines 20–53

export function filterOAuthApps({
  apps,
  searchString,
  registrationTypes = [],
  clientTypes = [],
}: FilterOAuthAppsParams): OAuthClient[] {
  return apps.filter((app) => {
    // Filter by search string
    if (searchString) {
      const searchLower = searchString.toLowerCase()
      const matchesName = app.client_name.toLowerCase().includes(searchLower)
      const matchesClientId = app.client_id.toLowerCase().includes(searchLower)
      if (!matchesName && !matchesClientId) {
        return false
      }
    }

    // Filter by registration type
    if (registrationTypes.length > 0) {
      if (!registrationTypes.includes(app.registration_type)) {
        return false
      }
    }

    // Filter by client type
    if (clientTypes.length > 0) {
      if (!clientTypes.includes(app.client_type)) {
        return false
      }
    }

    return true
  })
}

Subdomains

Called By

Frequently Asked Questions

What does filterOAuthApps() do?
filterOAuthApps() is a function in the supabase codebase.
What calls filterOAuthApps()?
filterOAuthApps() is called by 1 function(s): OAuthAppsList.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free