New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@oneuid/login

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oneuid/login

Drop-in login component for OneUID — email/password, OAuth (Google, GitHub, Apple), and phone OTP

latest
Source
npmnpm
Version
0.1.3
Version published
Maintainers
1
Created
Source

@oneuid/login

npm version build license

Drop-in login component for OneUID. Renders the right UI from your app’s enabled auth methods: email/password, OAuth (Google, GitHub, Apple), and phone OTP.

Install

npm install @oneuid/login
# or
pnpm add @oneuid/login
# or
yarn add @oneuid/login

Peer dependencies: React 18+ (and react-dom).

Usage

import { LoginBox } from '@oneuid/login';

<LoginBox
  clientId="clxx..."
  apiUrl="https://api.oneuid.dev"
  onSuccess={(data) => {
    console.log(data.accessToken, data.refreshToken);
    // Store tokens and redirect or update app state
  }}
  onError={(msg) => console.error(msg)}
/>

Props

PropTypeRequiredDescription
clientIdstringYesYour OneUID app client ID (from the dashboard).
apiUrlstringYesOneUID API base URL (e.g. https://api.oneuid.dev).
onSuccess(data: LoginSuccessData) => voidYesCalled with { accessToken, refreshToken, expiresIn, user } after a successful login.
onError(error: string) => voidNoCalled when loading auth methods or login fails.
redirectUrlstringNoOAuth callback URL (defaults to current window location).
classNamestringNoExtra CSS class for the container.
brandNamestringNoApp name shown in the title (otherwise from API).
logoUrlstringNoURL of your logo image.

The component fetches enabled auth methods from GET /v1/public/auth-methods?clientId=... and shows the matching options (social buttons, email/password form, or phone OTP flow).

License

MIT

Keywords

oneuid

FAQs

Package last updated on 23 Mar 2026

Did you know?

Socket

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