### Node.js: Get User Info with Repl Authentication Source: https://github.com/replit/repl-auth-node/blob/main/README.md This snippet demonstrates how to use the `getUserInfo` function from the Repl Authentication library to retrieve user details within a Node.js Express application. It requires the Express framework and the `getUserInfo` function. The function takes a request object and returns a UserInfo object containing user ID, name, bio, URL, profile image, roles, and teams. ```javascript const express = require('express'); const { getUserInfo } = require('../index.js') const app = express(); app.use(express.static('public')); app.get('/', async function(req, res) { const userInfo = getUserInfo(req) console.log(userInfo) } ``` ```javascript const userInfo = getUserInfo(req) ``` -------------------------------- ### Run Repl Authentication Tests Source: https://github.com/replit/repl-auth-node/blob/main/README.md This command executes the test suite for the Repl Authentication project. After running the tests, users should log in and verify that the output indicates 'server tests passed'. ```bash npm run test ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.