Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Coding agents: Add full-stack auth to your app

Let your coding agents guide you into implementing Scalekit full-stack authentication in minutes

Install the authstack plugin, then tell your coding agent to add SaaSKit auth to your app.

  1. Install the authstack plugin

    Terminal
    npx @scalekit-inc/cli setup

    For repeated use, install globally:

    Terminal
    npm install -g @scalekit-inc/cli
    scalekit setup

    Select Claude Code when prompted. The CLI installs the authstack plugin for you.

    Tool-native alternative (if not using the CLI)
    Terminal window
    claude plugin marketplace add scalekit-inc/authstack
    claude plugin install agentkit@authstack
    claude plugin install saaskit@authstack

    Or run /plugins inside Claude to enable via the wizard.

  2. Generate authentication implementation

    Copy the following prompt into your coding agent:

    Authentication implementation prompt
    Add SaaSKit auth to my app. I need login, sessions, and logout.
  3. Verify the implementation

    After the coding agent completes, verify that all authentication components are properly configured:

    Check generated files:

    • Scalekit client initialization with environment credentials (you may need to set up a .env file with your Scalekit API credentials)
    • Login route that redirects to Scalekit’s authorization endpoint
    • OAuth callback route that exchanges the code for tokens
    • Secure session storage with proper cookie attributes
    • Logout endpoint that clears the session

    The login flow should redirect users to Scalekit’s authorization page, where they authenticate. Your application should then exchange the returned authorization code for tokens, store the session, and redirect the user to the protected area of your app.