AI-powered adeno-associated virus (AAV) vector design for gene therapy including capsid engineering, promoter selection, and tropism optimization.
日本語の概要は準備中です。原文の説明を表示しています。
Add authentication and user management to a Netlify site with @netlify/identity — signup/login/logout, OAuth social login (Google/GitHub/GitLab/Bitbucket), server-side user verification in Functions, role-based access control (RBAC), admin user management, and Identity event hooks. Use when adding a login/signup flow, "add social login", gating content by user role, protecting a function or page behind auth, assigning roles at signup, customizing auth emails, or handling OAuth/confirmation/recovery callbacks. Not for locking an entire site to a company/team — that is netlify-access-control.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Auth and user management for a Netlify site without requiring visitors to be Netlify users. Package: @netlify/identity.
Reach for @netlify/identity. Do NOT use the legacy netlify-identity-widget or gotrue-js for new work — same capabilities, simpler API, built-in server-side support.
netlify dev. Test auth flows on a deploy — Deploy Previews work. Local netlify dev cannot exercise /.netlify/identity/*.client_id/secret in code, no custom callback token exchange. Use oauthLogin() + handleAuthCallback(). Raw OAuth beside Identity is the single most common source of rework.api.netlify.com to flip/inspect Identity settings, never read tokens from ~/Library/Preferences/netlify/config.json, never probe undocumented endpoints.login()/signup()/logout() need CSRF protection. Call verifyRequestOrigin(req) first, or an attacker can log a victim into the attacker's account./.netlify/identity/* unreachable, OAuth doesn't return): surface the error, the dashboard URL, and the setting to check — then stop. Do not invent recovery commands.Identity must be enabled in the dashboard first (no API): Project configuration > Identity (https://app.netlify.com/projects/{site_name}/configuration/identity) → Enable Identity.
npm install @netlify/identity
HTTPS is required. On a custom domain, get HTTPS/SSL working before integrating Identity.
import { signup, login, logout, getUser, oauthLogin, handleAuthCallback } from '@netlify/identity'
// Sign up — sends a confirmation email by default (skippable via autoconfirm setting)
const user = await signup('jane@example.com', 'securepassword', { full_name: 'Jane Doe' })
// Log in / log out
await login('jane@example.com', 'securepassword')
await logout()
// Current user — null if not logged in (works in browser + server)
const u = await getUser()
if (u) console.log(u.email)
// OAuth — redirects browser to provider login
oauthLogin('github') // 'google' | 'github' | 'gitlab' | 'bitbucket'
Callback handling is mandatory. Call handleAuthCallback() on your landing page. It processes ALL token types in the URL hash — OAuth redirect, email confirmation, password recovery, invite. Without it, confirmation links and OAuth redirects never complete.
import { handleAuthCallback } from '@netlify/identity'
const result = await handleAuthCallback()
if (result) console.log(result.type, result.user.email) // may be falsy if nothing to process
Other client functions:
recoverPassword() — complete a password reset (alternative to letting handleAuthCallback() handle the recovery_token).acceptInvite() — complete invite acceptance (alternative to handleAuthCallback() handling invite_token).refreshSession() — refresh token/session so newly-assigned roles take effect.Don't hard-code which providers exist. Call getSettings() at startup and render the signup form and OAuth buttons from what it returns.
Handlers are modern v2 functions: export default async (req, context) => {}. v1 export { handler } is not supported for getUser()/login()/admin.*.
import { getUser } from '@netlify/identity'
import type { Context } from '@netlify/functions' // or '@netlify/edge-functions' for Edge
export default async (req: Request, context: Context) => {
const user = await getUser()
if (!user) return new Response('Unauthorized', { status: 401 })
if (!user.roles.includes('admin')) return new Response('Forbidden', { status: 403 })
return Response.json({ id: user.id, email: user.email })
}
getUser() works in browser, Netlify Functions, and Edge Functions.
CSRF — always guard exposed login/signup/logout endpoints:
import { login, verifyRequestOrigin } from '@netlify/identity'
import type { Context } from '@netlify/functions'
export default async (req: Request, context: Context) => {
verifyRequestOrigin(req) // throws 403 on Origin mismatch; supports { allowedOrigins }
const { email, password } = await req.json()
await login(email, password)
return new Response(null, { status: 302, headers: { Location: '/dashboard' } })
}
admin.* uses a short-lived admin token and runs only in Netlify Functions — NOT browser, NOT Edge Functions.
import { admin } from '@netlify/identity'
import type { Context } from '@netlify/functions'
export default async (req: Request, context: Context) => {
const users = await admin.listUsers() // array of users
return Response.json({ total: users.length })
}
admin.listUsers() — array of users.admin.updateUser() — update a user (e.g. roles). Full API: https://www.npmjs.com/package/@netlify/identityJWT stored in cookie nf_jwt, sent automatically. Server-side login/signup/logout read/write nf_jwt and nf_refresh via the runtime, so the browser gets the session in the response.
User objectid, email, roles (array from app_metadata.roles, included in the JWT).
Functions the platform invokes automatically on Identity events (you don't call them).
Modern typed-handler syntax — export a default object with a method per event. Typed handlers require @netlify/functions ≥ 5.2.0.
import type { UserSignupEvent } from "@netlify/functions"
export default {
userSignup(event: UserSignupEvent) {
console.log(`New signup: ${event.user.email}`)
},
}
Handlers and triggers:
| Handler | Fires when |
|---|---|
userValidate | User attempts signup, before account creation — block by email domain, rate-limit, custom validation. |
userSignup | Signup completes (email or external). Fires after email confirmation if confirmation is enabled. Assign roles, sync, notify. |
userLogin | User logs in — track logins, sync, block a user. |
userModified | Profile updated. |
userDeleted | User deleted (notification only). |
Deny an action: call event.deny() from userValidate/userSignup/userLogin/userModified (NOT userDeleted). User gets a 401; no observability error. With multiple subscribers, the first event.deny() aborts the chain.
import type { UserValidateEvent } from "@netlify/functions"
export default {
userValidate(event: UserValidateEvent) {
if (!event.user.email?.endsWith("@example.com")) return event.deny()
},
}
Assign roles at signup — return { user: {...} } to mutate the persisted record. Payload fields are camelCase (appMetadata, userMetadata, confirmedAt).
import type { UserSignupEvent } from "@netlify/functions"
export default {
userSignup(event: UserSignupEvent) {
return {
user: { ...event.user, appMetadata: { ...event.user.appMetadata, roles: ["member"] } },
}
},
}
Background mode — action completes immediately, handler runs async:
import type { Config, UserLoginEvent } from "@netlify/functions"
export default { userLogin(event: UserLoginEvent) { /* async tracking */ } }
export const config: Config = { background: true }
Event types from @netlify/functions: UserValidateEvent, UserSignupEvent, UserLoginEvent, UserModifiedEvent, UserDeletedEvent, Config.
signup()) or Invite only (all new users, including external-provider logins, must be invited first).invite_token → process with handleAuthCallback() or acceptInvite().Stored on the User object; edit in Identity > Users > Edit settings:
user_metadata.full_name.user_metadata.email.app_metadata.roles. Read via getUser().Set roles: at signup via userSignup handler returning { user: {...} }; for existing users via admin.updateUser() in a Function. Role changes take effect on next login or token refresh, not immediately (they don't invalidate the current JWT — client can refreshSession()).
Enforced at the CDN edge (no origin round trip). Add a Role parameter to redirect rules.
# _redirects — ALWAYS include a fallback or non-admins get a raw 404
/admin/* /admin/:splat 200! Role=admin
/admin/* /login 401!
# multiple roles, comma-chained
/private/* /private/:splat 200! Role=editor,admin
# netlify.toml
[[redirects]]
from = "/admin/*"
to = "/admin/:splat"
force = true
status = 200
conditions = {Role = ["editor", "admin"]}
Netlify Identity roles resolve at app_metadata.roles.
You may use Identity OR an external JWT provider, not both — you cannot authenticate third-party JWT tokens while Identity is enabled. Set the secret at Project configuration > Access & security > Visitor access > JWT secret (project-level overrides team-level default).
"alg": "HS256", "typ": "JWT".exp (future Unix Epoch); other fields optional.app_metadata.authorization.roles. Different path → contact support for a custom role path (support-configured, not self-service).Default sender no-reply@netlify.com. Custom sender (Pro+): set SMTP hostname/port/username/password under Emails > Outgoing email address (use SendGrid/Mailjet/etc. for volume).
Custom templates (Pro+): publish HTML to a path on your deployed project, set the path (relative to domain, starting /) under Emails. Rules: inline CSS only, absolute image links, NO <html>/<head>/<body> tags. Keep template variables intact — don't let your build rewrite them.
Go template variables: {{ .Email }}, {{ .NewEmail }} (email-change only), {{ .SiteURL }}, {{ .ConfirmationURL }}, {{ .Token }}. Custom link form: {{ .SiteURL }}/path/#confirmation_token={{ .Token }} (also invite_token, recovery_token, email_change_token).
Project configuration > Identity > Identity audit log. Search with a required scope prefix: author:[string] or action:[string]. Action names: login, logout, user_signedup, user_deleted, user_modified, token_revoked, token_refreshed, user_recovery_requested, user_invited.
references/advanced-patterns.md — SSR / session hydration.references/authorization-and-sessions.md.netlify-identity-widget / gotrue-js — superseded by @netlify/identity.identity-validate.ts, identity-signup.ts, identity-login.ts, -background suffix) still work but prefer typed handlers. Legacy denial = return non-2xx status; new code uses event.deny().These are org conventions, not docs facts — merged into the rendered skill by ctx-gen and never generated. Owned by the skills maintainer.
references/advanced-patterns.md
(SSR/session hydration) and references/authorization-and-sessions.md.netlify dev — test auth flows on deploys
(Deploy Previews work).api.netlify.com to flip or inspect Identity settings, never read auth
tokens from ~/Library/Preferences/netlify/config.json, never probe for
undocumented endpoints./.netlify/identity/* unreachable, OAuth flow
doesn't return), surface the error, the dashboard URL, and the setting to
check — then stop. Do not invent recovery commands.client_id/secret in code, no custom
callback token exchange. Use oauthLogin() + handleAuthCallback();
raw OAuth beside Identity is the single most common source of rework.getUser()/login()/admin.* require modern v2 functions
(export default) — v1 export { handler } is not supported. Typed
Identity event handlers (UserSignupEvent, event.deny()) require
@netlify/functions ≥ 5.2.0; older installs use the legacy filenames.getSettings() at
startup and render the signup form and OAuth buttons from what it returns.This skill is written to stay usable across GitHub Copilot, Claude Code, and Codex.
$CODEX_HOME/skills/netlify-identity and restart Codex after major changes.Preferred MCP Server: None required
netlify-identity outside its documented task boundary.Before claiming the netlify-identity workflow succeeded:
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
AI-powered adeno-associated virus (AAV) vector design for gene therapy including capsid engineering, promoter selection, and tropism optimization.
日本語の概要は準備中です。原文の説明を表示しています。
Improve the clarity and voice of AI-assisted academic writing (papers, theses, rebuttals) and
日本語の概要は準備中です。原文の説明を表示しています。
12-agent academic paper writing pipeline. 11 modes (full/plan/outline/revision/revision-coach/abstract/lit-review/format-convert/citation-check/disclosure/rebuttal-audit). 6 paper types, 5 citation formats, bilingual abstracts, LaTeX/DOCX-via-Pandoc/PDF output. Style Calibration + Writing Quality Check + Anti-Patterns with IRON RULE markers. Triggers: write paper, academic paper, guide my paper, parse reviews, audit my rebuttal, check my response draft, AI disclosure, 寫論文, 學術論文, 引導我寫論文, 審查意見, 評估回覆, 논문 작성, 초록 작성, 논문 수정, 논문 계획을 도와줘, 심사 의견 반영, 답변서 점검, AI 사용 고지.
日本語の概要は準備中です。原文の説明を表示しています。
Systematic writing framework for philosophy and interdisciplinary academic papers from optimized outline to submission-ready manuscript. Use when users want to: (1) write a paper from a detailed outline, (2) ensure quality control during writing, (3) maintain consistency across chapters, (4) prepare a submission-ready manuscript, or (5) systematically execute a planned paper. Triggered by phrases like 'write the paper from this outline,' 'compose the full manuscript,' 'execute the outline,' or when users have completed strategic planning (academic-paper-strategist skill) and are ready to write. Takes optimized outline as input; outputs complete manuscript with iterative quality checks.
日本語の概要は準備中です。原文の説明を表示しています。
Multi-perspective academic paper review with dynamic reviewer personas. Runs a 5-seat, role-separated review panel (Journal-Fit Reviewer + 3 peer-review roles + Devil's Advocate) with field-specific expertise; role separation is not a claim of independent error processes. Supports full review, re-review (verification), quick assessment, methodology focus, Socratic guided, and calibration modes. Triggers on: review paper, peer review, manuscript review, referee report, review my paper, critique paper, simulate review, editorial review, calibrate reviewer, reviewer calibration, measure reviewer accuracy, 審查論文, 論文審查, 模擬審查, 同儕審查, 幫我審這篇, 以審查人角度評估, 審查者校準, 논문 심사, 동료 심사, 모의 심사, 심사자 관점에서 평가, 심사자 보정.
日本語の概要は準備中です。原文の説明を表示しています。
Systematic strategic planning framework for philosophy and interdisciplinary academic papers targeting preprint platforms (PhilArchive, arXiv, PhilSci-Archive). Use when users want to: (1) plan a paper on a specific topic, (2) identify research gaps and assess originality, (3) develop optimized paper outlines, (4) prepare for preprint submission, or (5) understand platform requirements and writing standards. Triggered by phrases like 'plan a paper on,' 'help me design a paper about,' 'identify research gaps in,' 'is this idea original,' or when users need structured research planning. The skill guides through three phases: Platform Analysis (identifying target venue and studying sample papers), Theoretical Framework (AI-driven literature search and gap identification), and Outline Optimization (structured design with reviewer-perspective self-assessment). Each phase includes quality evaluation standards and validation checkpoints.
日本語の概要は準備中です。原文の説明を表示しています。