{"repo":"fastify/fastify-passport","free":true,"listed":false,"github":"https://github.com/fastify/fastify-passport","clone":"git clone https://github.com/fastify/fastify-passport.git","description":"Use passport strategies for authentication within a fastify application","language":"TypeScript","stars":302,"topics":["fastify","fastify-plugin","authentication","passport"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"@fastify/passport @fastify/passport is a port of passport for the Fastify ecosystem. It lets you use Passport strategies to authenticate requests and protect Fastify routes! Status Beta. @fastify/passport is still a relatively new project. There may be incompatibilities with express-based passport deployments, and bugs. Please report any issues so we can correct them! Installation Google OAuth2 Video tutorial The community created this fast introduction to @fastify/passport : Example Alternatively, @fastify/session is also supported and works out of the box for session storage. Here's an example: Session cleanup on logIn For security reasons the session is cleaned after login. You can manage this configuration at your own risk by: 1) Include keepSessionInfo true option when perform the passport .authenticate call; 2) Include keepSessionInfo true option when perform the request .login call; 3) Using clearSessionOnLogin (default: true) and clearSessionIgnoreFields (default: ['passport', 'session']) . Difference between @fastify/secure-session and @fastify/session @fastify/secure-session and @fastify/session are both session plugins for Fastify which are capable of encrypting/decrypting the session. The main difference is that @fastify/secure-session uses the stateless approach and stores the whole session in an encrypted cookie whereas @fastify/session uses the stateful approach for sessions and stores them in a session store. Session Serialization In a typical web application,","default_branch":null,"files":null,"tree":[],"storefront":"/r/fastify","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/fastify/fastify-passport/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}