Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@adonis-agora/authkit-react

Latest version: v1.0.0

Overview

Last scanned
26 Nov 2026
Published
26 Nov 2026
npm package Publisher: dudousxd
5 Stars
0 Forks
26 Versions
4.4K Downloads
TypeScript Repo language

Scan summary

@adonis-agora/authkit-react was last scanned on 26 Nov 2026 at version 1.0.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 26 versions; the latest 2 were published within 7 days (20–26 Nov 2026).
  • Findings: No rules fired in version 1.0.0.
  • Downloads: 4,364 downloads.

Versions

26 versions published
Versions and the rules that fired in each
VersionPublishedStatus
1.0.0 LATEST 26 Nov 2026 No rules fired
1.0.0-rc.13 20 Nov 2026 No rules fired
1.0.0-rc.12 18 Nov 2026 No rules fired
1.0.0-rc.11 17 Nov 2026 Not shown
1.0.0-rc.8 15 Nov 2026 Not shown

No rules fired in 1.0.0

Findings

Findings for v1.0.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 1.0.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@adonis-agora/authkit-react

Ergonomia de frontend sobre o AuthKit para apps AdonisJS + Inertia + React: um useAuth() tipado, helpers de papéis e componentes de gating.

Este pacote não faz autenticação — ele consome o estado de auth que o host AdonisJS já resolveu (via @adonis-agora/authkit-client) e compartilhou como uma shared-prop do Inertia.

Instalação

pnpm add @adonis-agora/authkit-react

react, react-dom e @inertiajs/react são peer dependencies (o app os fornece).

1. No host AdonisJS: compartilhar a prop authkit

A shared-prop tem o formato AuthSharedProps. Use authkit.getUser() / authkit.identity do @adonis-agora/authkit-client para preenchê-la — tipicamente num middleware ou no config/inertia.ts (sharedData):

// config/inertia.ts
import { defineConfig } from '@adonisjs/inertia'

export default defineConfig({
  sharedData: {
    authkit: async (ctx) => {
      const authkit = ctx.authkit // sua instância do Authenticator
      const user = await authkit.getUser() // mesmo shape de identityToUser/resolveUser
      return {
        user: user ?? null,
        globalRoles: authkit.identity?.globalRoles ?? [],
      }
    },
  },
})

O objeto user deve corresponder ao tipo AuthUser: { id, email, name?, avatarUrl?, globalRoles } — exatamente a saída de identityToUser/resolveUser do client.

2. No frontend: useAuth()

import { useAuth } from '@adonis-agora/authkit-react'

function Header() {
  const { user, isAuthenticated, hasGlobalRole } = useAuth()

  if (!isAuthenticated) return <a href="/login">Entrar</a>

  return (
    <div>
      Olá, {user!.name ?? user!.email}
      {hasGlobalRole('ADMIN') && <a href="/admin">Admin</a>}
    </div>
  )
}

useAuth() nunca lança quando a prop está ausente: retorna estado não-autenticado (user: null, listas vazias).

3. Componentes de gating

import { Authenticated, Guest } from '@adonis-agora/authkit-react'

<Authenticated fallback={<LoginButton />}>
  <Dashboard />
</Authenticated>

<Guest>
  <MarketingBanner />
</Guest>

Gating por papel/permissão de app (<Can>) migrou para @adonis-agora/authz-react, que consulta o serviço Authz em vez de depender de papéis de app resolvidos no host — veja a doc desse pacote.

4. AuthProvider (opcional)

Fora do Inertia (testes, Storybook), injete o valor manualmente. O contexto tem precedência sobre as page props quando presente:

import { AuthProvider } from '@adonis-agora/authkit-react'

<AuthProvider value={{ user, globalRoles: user.globalRoles }}>
  <App />
</AuthProvider>

5. Config + componentes prontos

Envolva a app com <AuthkitProvider> (URLs, CSRF, modo de IdP). Os componentes de conta (UserProfile, AuthorizedApps, OrganizationSwitcher, OrganizationProfile) buscam dados pela Account API, então também precisam de QueryClientProvider + AuthkitClientProvider:

import '@adonis-agora/authkit-react/styles.css'
import { QueryClientProvider } from '@tanstack/react-query'
import {
  AuthkitClientProvider,
  AuthkitProvider,
  createAuthkitQueryClient,
  AuthorizedApps,
  UserButton,
  UserProfile,
} from '@adonis-agora/authkit-react'

const queryClient = createAuthkitQueryClient()

<QueryClientProvider client={queryClient}>
  <AuthkitClientProvider>
    <AuthkitProvider config={{ csrfToken: page.props.csrfToken }}>
      <UserButton />
      <UserProfile />
      <AuthorizedApps />
    </AuthkitProvider>
  </AuthkitClientProvider>
</QueryClientProvider>

Para telas próprias, use as query options com useQuery/useMutation (useMeQueryOptions, useAccountSessionsQueryOptions, useAppsQueryOptions, useAccountOrgsQueryOptions, …). Temável via CSS vars --authkit-*.

Helpers puros

Para uso fora de componentes, as funções de papéis são exportadas e livres de React:

import { hasGlobalRole, hasAnyGlobalRole, hasAllGlobalRoles } from '@adonis-agora/authkit-react'

hasGlobalRole(user, 'ADMIN')
hasAnyGlobalRole(user, ['ADMIN', 'TEACHER'])

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @adonis-agora/authkit-react

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229