Socket
Socket
Sign inDemoInstall

@replit/repl-auth

Package Overview
Dependencies
76
Maintainers
21
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @replit/repl-auth

Repl Authentication is a simple way to allow users to log in, and access their information.


Version published
Weekly downloads
18K
decreased by-50.36%
Maintainers
21
Install size
2.12 MB
Created
Weekly downloads
 

Readme

Source

Repl Authentication

Repl Authentication is a simple way to allow users to log in, and access their information.

Get started

Ensure that a user is logged in with replit following our docs

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)
}

Docs

getUserInfo(Request req)

Gets all user info. Returns UserInfo object.

const userInfo = getUserInfo(req)

UserInfo object:

UserInfo {
  id?: string;
  name?: string;
  bio?: string;
  url?: string;
  profileImage?: string;
  roles?: Array<string>
  teams?: Array<string>
}

Tests

npm run test

Then login and assure that it says "server tests passed"

FAQs

Last updated on 12 Aug 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc