Registry / auth-security / fl-auth-server

fl-auth-server

JSON →
library11.7.2jsnpmunverified

Server-side authentication package for FounderLab apps, version 11.7.2. Provides Express-based login, registration, logout, password reset, and OAuth (Facebook, LinkedIn) strategies using Passport.js. It is part of a proprietary suite with no public release history or cadence. Differentiators include automatic route generation, support for custom User models, and integrated session management via express-session. The library is not actively maintained on GitHub. Alternatives include passport.js directly or NextAuth.js for more modern setups.

npm install fl-auth-server
INSTALL
IMPORT
SIG · FL-AUTH-SERVER
F
fl-auth-server
auth-securityjavascriptv11.7.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

configure
import { configure } from 'fl-auth-server'
const configure = require('fl-auth-server')
ESM-only; no default export. The main function for setting up auth routes.
loggedIn
import { loggedIn } from 'fl-auth-server'
const { loggedIn } = require('fl-auth-server')
Middleware to protect routes; requires ESM import.
Passport
import { Passport } from 'fl-auth-server'
Only if you need direct access to Passport instance; typically not needed.
default
import flAuthServer from 'fl-auth-server'
import { default } from 'fl-auth-server'
No default export; use named imports only.

Shows minimal setup for fl-auth-server with Express, session middleware, Facebook OAuth, and password reset email placeholder.

import express from 'express'; import session from 'express-session'; import { configure } from 'fl-auth-server'; const app = express(); app.use(session({ secret: 'keyboard cat', resave: false, saveUninitialized: true })); configure({ app, facebook: { clientId: process.env.FACEBOOK_CLIENT_ID ?? '', clientSecret: process.env.FACEBOOK_CLIENT_SECRET ?? '', url: process.env.URL ?? 'http://localhost:3000', paths: { redirect: '/auth/facebook', callback: '/auth/facebook/callback', }, }, login: { usernameField: 'email', passwordField: 'password', }, sendResetEmail: async (user, resetToken) => { console.log(`Reset token for ${user.email}: ${resetToken}`); }, }); app.listen(3000, () => console.log('Server running on port 3000'));
Debug
Known issues
breakingImport style must be ESM; CommonJS require() will not work.
fix
Use import { configure } from 'fl-auth-server' instead of require('fl-auth-server').
affects: >=11.0.0
gotchaThe facebook configuration object is documented twice in README, but the second mention is actually for LinkedIn.
fix
Use 'linkedin' key instead of second 'facebook' when configuring LinkedIn.
affects: >=11.0.0
deprecatedPassport version in fl-auth-server may not be up-to-date; OAuth flows may break with modern Facebook/LinkedIn API changes.
fix
Consider migrating to passport.js directly with latest strategies.
affects: >=11.0.0
gotchaSession middleware (express-session) must be added to app before calling configure(); otherwise sessions will not work.
fix
Ensure app.use(session(...)) is called before configure({app, ...}).
affects: >=11.0.0
breakingThe sendResetEmail function is required but not passed in the example; missing it will cause an error.
fix
Provide a sendResetEmail callback in the options object.
affects: >=11.0.0
Errors
Common errors & fixes
TypeError: fl_auth_server_1.configure is not a function
Using CommonJS require() instead of ESM import.
fix
Change to import { configure } from 'fl-auth-server' and ensure your project is configured for ESM.
Error: Cannot find module 'express-session'
express-session not installed or not required before configure() is called.
fix
Run npm install express-session and add app.use(session({...})) before configure().
Error: No default engine was specified and no extension was provided.
View engine not set for reset email template; the library may try to render views.
fix
Set a view engine like EJS or disable views by overriding sendResetEmail to avoid template rendering.
FacebookLoginError: 'redirect_uri' is not valid
The url option in facebook config does not match the deployed app's domain.
fix
Ensure process.env.URL matches the exact callback URL registered in Facebook App Settings.
Upgrade
Version history
11.7.2latest on npm
Audit
Dependencies
expressrequiredRequired to provide app instance for middleware and route configuration
passportrequiredUnderlying authentication framework used by fl-auth-server
express-sessionoptionalSession middleware required when sessions are enabled
Agent activity
15 hits · last 30 days
node
14
OpenAI (training)
1
Resources
fl-auth-server — npm install fl-auth-server · libregistry