Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
acedergren avatar

Oracle Idcs Better Auth Setup

  • 10 installs
  • 22 repo stars
  • Updated May 28, 2026
  • acedergren/agentic-tools

oracle-idcs-better-auth-setup is a Claude Code skill that sets up Better Auth with Oracle IDCS / OCI IAM OIDC and routes auth problems to the right sub-skill.

About

oracle-idcs-better-auth-setup is a Claude Code skill for wiring Better Auth to Oracle IDCS / OCI IAM using OIDC. It acts as a router that diagnoses where an auth problem lives (setup, Fastify bridge, or org provisioning) and covers callback URLs, trusted origins, required scopes, and provider bootstrap order. A developer uses it when standing up the shared auth foundation across Fastify and Next.js apps. It bundles env-validation and setup-checklist scripts.

  • Router skill for setting up Better Auth with Oracle IDCS / OCI IAM (OIDC)
  • Enforces env-first provider bootstrap, correct callback URLs, and required IDCS scopes
  • Includes env-validation and setup-checklist scripts and a decision tree to the right sub-skill

Oracle Idcs Better Auth Setup by the numbers

  • 10 all-time installs (skills.sh)
  • Ranked #3,590 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

oracle-idcs-better-auth-setup capabilities & compatibility

Free skill; requires Oracle IDCS / OCI IAM credentials and env config for the auth provider.

Capabilities
auth setup · oidc config · provider bootstrap · auth diagnosis
Works with
oracle
Use cases
api development · security audit
Pricing
Free
From the docs

What oracle-idcs-better-auth-setup says it does

Use when setting up Better Auth with Oracle IDCS/OCI IAM, configuring OIDC callback URLs, trusted origins, provider bootstrap order, or sharing an auth model between Fastify and Next.js.
SKILL.md
Never skip `urn:opc:idm:__myscopes__` from IDCS scopes — its absence silently removes the `groups` claim from tokens, breaking all role-based logic downstream.
SKILL.md
npx skills add https://github.com/acedergren/agentic-tools --skill oracle-idcs-better-auth-setup

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs10
repo stars22
Last updatedMay 28, 2026
Repositoryacedergren/agentic-tools

What it does

Set up Better Auth with Oracle IDCS / OCI IAM OIDC, including callback URLs, scopes, trusted origins, and provider bootstrap.

Who is it for?

Standing up the shared Oracle IDCS + Better Auth foundation across Fastify and Next.js apps.

Skip if: Fastify request/session bridge internals or post-login org provisioning, which have their own skills.

When should I use this skill?

Setting up Better Auth with Oracle IDCS/OCI IAM, configuring OIDC callback URLs, trusted origins, or provider bootstrap.

What you get

A working Oracle IDCS + Better Auth foundation with correct callbacks, scopes, trusted origins, and env-first bootstrap.

  • OIDC auth configuration
  • provider bootstrap logic
  • setup verification checklist

By the numbers

  • Six-step foundation verification order
  • Four required OIDC scopes (openid, email, profile, __myscopes__)

Files

SKILL.mdMarkdownGitHub ↗

Oracle IDCS + Better Auth Setup

Entry skill for the full auth foundation: Oracle adapter, OIDC config, trusted origins, callback URLs, provider bootstrap, and cross-app consistency.

This is a router, not a deep implementation guide. Use it to diagnose where the problem lives, then hand off to the right skill.

NEVER

  • Never mix full-stack setup guidance with Fastify bridge internals or org provisioning internals — each skill owns its domain.
  • Never bootstrap providers from DB on cold-start — seed from env first, then reflect into Oracle provider tables for operator visibility.
  • Never write provider bootstrap that overwrites existing operator-managed rows — idempotent create-if-missing only.
  • Never skip urn:opc:idm:__myscopes__ from IDCS scopes — its absence silently removes the groups claim from tokens, breaking all role-based logic downstream.
  • Never trust that OAuth success means local session success — wrong callback URL produces OAuth success followed by local session failure, a misleading failure mode.

Decision Tree: Which Skill Owns This?

Is the problem in the auth foundation (setup, config, bootstrap)?
├── Yes → Stay in this skill

Is the problem in runtime request/session handling in Fastify?
├── Yes → Switch to: fastify-better-auth-bridge

Is the problem in post-login membership, groups, or org_members writes?
├── Yes → Switch to: oracle-idcs-org-provisioning

Is the user unsure which layer the bug is in?
├── Yes → Use this skill to verify setup checklist first

Foundation Verification Order

When diagnosing setup issues, verify in this exact order (later items depend on earlier ones):

1. Oracle adapter and Better Auth tables exist in DB 2. IDCS confidential application uses the correct callback URL 3. Scopes include openid,email,profile,urn:opc:idm:__myscopes__ 4. Trusted origins and cookie attributes match the deployed app topology 5. Env config can cold-start auth before DB-managed provider settings are edited 6. Env-to-DB bootstrap is idempotent and never overwrites existing provider rows

Non-Obvious Setup Rules

Env-first bootstrap: Auth must be functional from env vars alone before provider rows exist in DB. Provider rows are for operator visibility, not for cold-start. If you invert this, auth breaks on first deploy before any DB seed runs.

Shared building blocks: Oracle adapter, cookie rules, IDCS profile mapper, and session hook behavior must be shared across Fastify and Next.js apps. Diverging these two causes subtle token/session inconsistencies that are hard to trace.

Naming stability: When the codebase already uses IDCS and OCI_IAM_* env var naming, keep it. Mixing naming schemes (e.g., introducing ORACLE_* vars) breaks scripts and makes the env matrix confusing.

Callback URL failure mode: A wrong callback URL looks like OAuth flow succeeds (IDCS redirects back) but local session creation fails immediately after. Check this before debugging anything else if login appears to "complete" but the user isn't authenticated.

Common Gotchas

SymptomLikely Cause
No groups claim in tokenMissing urn:opc:idm:__myscopes__ scope
OAuth succeeds, session failsWrong callback URL in IDCS app config
Provider rows wiped on deployBootstrap logic not idempotent
Auth works locally, fails in prodTrusted origins missing prod domain

Scripts

# Validate all required env vars are set
node scripts/validate-idcs-env.js

# Print full setup checklist with current state
node scripts/print-auth-checklist.js

Arguments

  • $ARGUMENTS: Optional setup focus
  • Example: /oracle-idcs-better-auth-setup callback-url
  • Example: /oracle-idcs-better-auth-setup trusted-origins
  • If empty: audit the full shared auth setup flow

Related skills

FAQ

Why is the groups claim missing from my token?

The IDCS scopes are missing urn:opc:idm:__myscopes__, whose absence silently removes the groups claim and breaks all role-based logic downstream.

OAuth succeeds but my user is not authenticated. Why?

A wrong callback URL makes IDCS redirect back successfully while local session creation fails immediately after; check the callback URL first.

Backend & APIsappseccompliance

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.