Portabase Logo
CLIGuides

Add a login provider

Enable single sign-on (OIDC or OAuth) on a dashboard with the CLI.

At the end of this guide, users can log in to your dashboard with your identity provider.

Prerequisites: a dashboard served on a public URL (not localhost), and a client ID / secret from your provider — see OIDC setup or OAuth2 setup.

Set the public URL

portabase dashboard set ./my-dashboard url https://backup.example.com

Add the provider

printf '%s\n' "$KEYCLOAK_SECRET" | portabase dashboard auth add ./my-dashboard oidc keycloak \
  --issuer https://sso.example.com/realms/main \
  --client portabase --secret-stdin \
  --title "Company SSO" --scopes "openid profile email" --pkce

For OAuth (Google, GitHub…), use oauth <provider> and drop --issuer.

Register the callback URL

The CLI prints the callback URL. Add it to your provider's allowed redirect URIs.

Restart and test

portabase restart ./my-dashboard

The login page now shows a Company SSO button.

Next steps

Last updated on

On this page