replit-auth

Set up Replit OpenID Connect and PKCE authentication in Express, React, and React Native projects.

Updated May 16, 2026
One-click install
npx skills add https://github.com/ckrono-prog/Kotlin-Code-Builder --skill replit-auth-ckrono-prog
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: replit-auth
Source: https://github.com/ckrono-prog/Kotlin-Code-Builder/tree/main/.local/skills/replit-auth
Command: npx skills add https://github.com/ckrono-prog/Kotlin-Code-Builder --skill replit-auth-ckrono-prog

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires openid-client, cookie-parser, express, session, pg, expo-auth-session, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill provides an automated authentication setup with Replit's OpenID Connect and PKCE, addressing the need for a secure user authentication system in Express, React/Vite, and React Native projects.

Core Features & Use Cases

  • Express/React Auth: Handles full OIDC flow, session management, and cookie-based authentication for web applications.
  • Mobile Auth: Optional setup for mobile React Native applications with secure OAuth handling and Expo session storage.
  • Database Schema: Includes an authentication schema for PostgreSQL to handle user sessions.
  • Security Features: PKCE mandatory, state and nonce to prevent CSRF, ID tokens fully validated on server, and secure token handling.

Quick Start

Initialize the Replit authentication by following the provided steps to set up your server, database, and web app with SKILL.md.

Frequently Asked Questions about replit-auth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up Replit OpenID Connect authentication in an Express backend?

Replit authentication in React Native is supported using expo-auth-session to handle the mobile OAuth flow securely. This Skill provides optional setup to configure Expo session storage and connect mobile clients to your Replit OIDC backend.

What database dependencies are required for Replit OIDC user sessions?

Replit OIDC user sessions require PostgreSQL to store authentication schema data. This Skill provides the necessary database schema and uses the pg library to handle session persistence alongside cookie-parser and express-session middleware.

Does Replit authentication use PKCE and how are CSRF attacks prevented?

Replit authentication enforces PKCE for the OIDC flow and uses state and nonce parameters to prevent CSRF attacks. This Skill ensures ID tokens are fully validated on the server for secure token handling.

Can I use Replit auth with a React Native mobile project?

Replit authentication in React Native is supported using expo-auth-session to handle the mobile OAuth flow securely. This Skill provides optional setup to configure Expo session storage and connect mobile clients to your Replit OIDC backend.

What is the best way to implement secure login for a Vite and React app deployed on Replit?

Secure login for Vite and React apps on Replit is best implemented using the platform's native OpenID Connect provider. This Skill streamlines that setup by providing the middleware, PKCE flow, and session management required out of the box.