Scan your whole stack
Are you using @adonis-agora/authkit-react?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v1.0.0
@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.
| Version | Published | Status |
|---|---|---|
| 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 |
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.
The publisher’s own README, as collected from the registry.
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.
pnpm add @adonis-agora/authkit-react
react, react-dom e @inertiajs/react são peer dependencies (o app os fornece).
authkitA 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.
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).
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.
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>
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-*.
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']) 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.
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).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.