npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@secureshare/nextjs

v1.0.1

Published

SecureShare authentication SDK for Next.js applications

Readme

@secureshare/nextjs

Official SecureShare SDK for Next.js applications. Add complete authentication to your app in minutes.

Installation

```bash npm install @secureshare/nextjs ```

Quick Start

1. Set up environment variables

Add these to your .env.local:

```env NEXT_PUBLIC_SECURESHARE_WORKSPACE_ID=your_workspace_id NEXT_PUBLIC_SUPABASE_URL=your_supabase_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key ```

2. Wrap your app with SecureShareProvider

```tsx // app/layout.tsx import { SecureShareProvider } from '@secureshare/nextjs'

export default function RootLayout({ children }) { return ( {children} ) } ```

3. Add authentication pages

```tsx // app/sign-in/page.tsx import { SignIn } from '@secureshare/nextjs'

export default function SignInPage() { return } ```

```tsx // app/sign-up/page.tsx import { SignUp } from '@secureshare/nextjs'

export default function SignUpPage() { return } ```

4. Protect your routes

```tsx // app/dashboard/page.tsx import { protect, currentUser } from '@secureshare/nextjs/server'

export default async function DashboardPage() { await protect() // Redirects to /sign-in if not authenticated const user = await currentUser()

return Welcome, {user?.firstName}! } ```

5. Use authentication in client components

```tsx 'use client'

import { useUser, UserButton } from '@secureshare/nextjs'

export function Header() { const { user, isSignedIn } = useUser()

return ( {isSignedIn ? ( ) : ( Sign In )} ) } ```

API Reference

Client Components

  • <SecureShareProvider> - Wrap your app to provide authentication context
  • <SignIn> - Pre-built sign in form
  • <SignUp> - Pre-built sign up form
  • <UserButton> - User profile dropdown with sign out

Client Hooks

  • useUser() - Get current user and authentication state
  • useAuth() - Sign in, sign up, and sign out methods
  • useOrganization() - Get user's organization

Server Functions

  • auth() - Get authentication state on the server
  • currentUser() - Get full user object on the server
  • protect() - Protect routes (redirects if not authenticated)
  • createSecureShareClient() - Create Supabase client for server operations

License

MIT