Gathering detailed insights and metrics for @albirex/fastify-logto
Gathering detailed insights and metrics for @albirex/fastify-logto
Gathering detailed insights and metrics for @albirex/fastify-logto
Gathering detailed insights and metrics for @albirex/fastify-logto
npm install @albirex/fastify-logto
Typescript
Module System
Node Version
NPM Version
58.7
Supply Chain
93.4
Quality
87.3
Maintenance
100
Vulnerability
99.3
License
PLpgSQL (95.33%)
TypeScript (4.67%)
Total Downloads
645
Last Day
12
Last Week
401
Last Month
645
Last Year
645
MIT License
76 Commits
2 Branches
1 Contributors
Updated on Jun 17, 2025
Minified
Minified + Gzipped
Latest Version
1.2.3
Package Id
@albirex/fastify-logto@1.2.3
Unpacked Size
20.00 kB
Size
6.81 kB
File Count
15
NPM Version
10.9.2
Node Version
22.15.0
Published on
May 30, 2025
Cumulative downloads
Total Downloads
Last Day
140%
12
Compared to previous day
Last Week
1,722.7%
401
Compared to previous week
Last Month
0%
645
Compared to previous month
Last Year
0%
645
Compared to previous year
2
6
🔐 Fastify plugin for integrating with Logto, a modern open-source identity platform.
To install the package, use your preferred package manager:
1npm install @albirex/fastify-logto 2# or 3yarn add @albirex/fastify-logto 4# or 5pnpm add @albirex/fastify-logto
1import Fastify from 'fastify'; 2import fastifyLogto from 'fastify-logto'; 3 4const app = Fastify(); 5 6app.register(fastifyLogto, { 7 appId: 'your-logto-app-id', 8 appSecret: 'your-logto-app-secret', 9 endpoint: 'https://your-logto-endpoint.com', 10 baseUrl: 'http://localhost:3000', 11 cookieSecret: 'your-cookie-secret', // use a strong secret in production 12}); 13
1app.get('/profile', { 2 preHandler: app.verifyLogto, 3 handler: async (request, reply) => { 4 const userInfo = await request.getLogtoUser(); 5 return { user: userInfo }; 6 } 7});
Property | Type | Description |
---|---|---|
appId | string | Your Logto application's ID. |
appSecret | string | Your Logto application's secret. |
endpoint | string | Your Logto server endpoint. |
cookieSecret | string | Secret used for signing cookies (sessions). |
baseUrl | string, optional | Your app's base URL (for callback routing). |
scopes | string[], optional | Define the scopes required for your application. |
1pnpm install 2pnpm build 3pnpm test
1pnpm link --global 2cd ../your-app 3pnpm link --global fastify-logto
This project is licensed under the MIT License.
Contributions are welcome! Please open an issue or submit a pull request for any enhancements or bug fixes.
For more information and advanced usage, please refer to the official documentation for Platformatic and LogTo.
No vulnerabilities found.
No security vulnerabilities found.