Custom OAuth2 / OIDC provider administration against the Supabase Auth API.
Registers and manages identity providers beyond the built-in social login list, e.g. a private OIDC issuer or a partner's OAuth2 server.
Like the rest of supabase.auth.admin, every function requires a client
configured with the project's service-role key.
(require '[supabase.core.client :as client]
'[supabase.auth.admin.custom-providers :as providers])
(def c (client/make-client "https://abc.supabase.co" "service-role-key"))
(providers/create-provider c {:provider-type "oidc"
:identifier "acme"
:name "Acme SSO"
:client-id "client-id"
:client-secret "client-secret"
:discovery-url "https://sso.acme.com/.well-known/openid-configuration"})
(providers/list-providers c)
Each function returns {:status :body :headers} on success or an anomaly
map on failure.
Custom OAuth2 / OIDC provider administration against the Supabase Auth API.
Registers and manages identity providers beyond the built-in social login
list, e.g. a private OIDC issuer or a partner's OAuth2 server.
Like the rest of `supabase.auth.admin`, every function requires a client
configured with the project's **service-role** key.
## Example
(require '[supabase.core.client :as client]
'[supabase.auth.admin.custom-providers :as providers])
(def c (client/make-client "https://abc.supabase.co" "service-role-key"))
(providers/create-provider c {:provider-type "oidc"
:identifier "acme"
:name "Acme SSO"
:client-id "client-id"
:client-secret "client-secret"
:discovery-url "https://sso.acme.com/.well-known/openid-configuration"})
(providers/list-providers c)
Each function returns `{:status :body :headers}` on success or an anomaly
map on failure.(create-provider client params)Registers a new custom provider.
client — service-role clientparams:
:provider-type — "oauth2" or "oidc" (required):identifier — unique slug used in sign-in URLs (required):name — display name (required):client-id / :client-secret — credentials at the provider (required):discovery-url — OIDC discovery document (oidc):issuer — expected iss claim (oidc):authorization-url / :token-url / :userinfo-url / :jwks-uri —
explicit endpoints (oauth2, or oidc without discovery):acceptable-client-ids, :scopes, :pkce-enabled,
:attribute-mapping, :authorization-params, :enabled,
:email-optional, :skip-nonce-check — optional behavior tuning(create-provider client {:provider-type "oidc" :identifier "acme"
:name "Acme SSO" :client-id "id"
:client-secret "secret"})
Registers a new custom provider.
## Parameters
* `client` — service-role client
* `params`:
* `:provider-type` — `"oauth2"` or `"oidc"` (required)
* `:identifier` — unique slug used in sign-in URLs (required)
* `:name` — display name (required)
* `:client-id` / `:client-secret` — credentials at the provider (required)
* `:discovery-url` — OIDC discovery document (oidc)
* `:issuer` — expected `iss` claim (oidc)
* `:authorization-url` / `:token-url` / `:userinfo-url` / `:jwks-uri` —
explicit endpoints (oauth2, or oidc without discovery)
* `:acceptable-client-ids`, `:scopes`, `:pkce-enabled`,
`:attribute-mapping`, `:authorization-params`, `:enabled`,
`:email-optional`, `:skip-nonce-check` — optional behavior tuning
## Example
(create-provider client {:provider-type "oidc" :identifier "acme"
:name "Acme SSO" :client-id "id"
:client-secret "secret"})(delete-provider client identifier)Deletes the custom provider identifier. Permanent; sign-ins through it
stop working.
(delete-provider client "acme")
Deletes the custom provider `identifier`. Permanent; sign-ins through it
stop working.
## Example
(delete-provider client "acme")(get-provider client identifier)Fetches the custom provider registered under `identifier`.
## Example
(get-provider client "acme")(list-providers client)(list-providers client opts)Lists the registered custom providers. Pass :type ("oauth2" or
"oidc") to filter.
(list-providers client)
(list-providers client {:type "oidc"})
Lists the registered custom providers. Pass `:type` (`"oauth2"` or
`"oidc"`) to filter.
## Example
(list-providers client)
(list-providers client {:type "oidc"})(update-provider client identifier params)Updates the custom provider identifier with params — same keys as
create-provider except :provider-type and :identifier, which are
immutable.
(update-provider client "acme" {:enabled false})
Updates the custom provider `identifier` with `params` — same keys as
`create-provider` except `:provider-type` and `:identifier`, which are
immutable.
## Example
(update-provider client "acme" {:enabled false})cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |