/meteor:meteor-accountsfrom Meteor
Wires up authentication in Meteor 3 apps: accounts-password, OAuth providers, 2FA, passwordless, email verification, and token storage (Web Storage vs HttpOnly cookies).
Ships in Meteor. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
accounts-base plus a flavor package (accounts-password,
accounts-google, etc.). Meteor stores users in Meteor.users and ships
the client a resume token mapped to that document.
accounts-password.accounts-base plus the provider package (e.g.
accounts-google) and configure the service.accounts-passwordless.accounts-2fa on top of accounts-password.For a custom users collection, configure both runtimes before app reads or validators. Meteor 3.6 fixes collection setup and publication lookup; review collection identity and client-write policy before changing profile rules.
// server/accounts.js
import { Accounts } from "meteor/accounts-base";
import { Meteor } from "meteor/meteor";
Meteor.startup(() => {
Accounts.config({
sendVerificationEmail: true,
});
Accounts.emailTemplates.siteName = "My App";
Accounts.emailTemplates.from = "[email protected]";
});
The from address is required; Meteor 3.5+ logs a server warning if you
omit it.
Do not set forbidClientAccountCreation: true when the client signup form
calls Accounts.createUser or Accounts.createUserAsync. The server rejects
that request with 403 Signups forbidden. For invite-only or administrator
provisioning, set the option on both client and server, remove the public
signup UI, and call Accounts.createUserAsync only from trusted server code
after its own authorization check.
// client/signin.js (Meteor 3.5+)
import { Meteor } from "meteor/meteor";
import { Accounts } from "meteor/accounts-base";
async function signUp({ email, password }) {
await Accounts.createUserAsync({ email, password });
}
async function signIn({ email, password }) {
await Meteor.loginWithPasswordAsync(email, password);
}
Client Accounts.createUser(options, callback) also remains supported.
Meteor.loginWithPasswordAsync was added in Meteor 3.5; on older 3.x use
the callback form of Meteor.loginWithPassword or wrap it in a Promise.
On the server use await Accounts.createUserAsync(options) and
await Accounts.setPasswordAsync(userId, newPassword).
Default token storage is Web Storage. To move the resume token into an HttpOnly cookie and keep the client tab in-memory only:
// server
Meteor.startup(() => {
Accounts.config({
clientStorage: "none",
useHttpOnlyCookies: true,
});
});
// settings.json (public; surfaces the same flags to the client)
{
"public": {
"packages": {
"accounts": {
"clientStorage": "none",
"useHttpOnlyCookies": true
}
}
}
}
After restart and login, verify an HttpOnly meteor_login_token cookie and
no persisted Meteor.loginToken*. Tabs still hold credentials in memory
for DDP; active same-origin XSS can access them.
With [email protected] (Meteor 3.5.2), the server handles cookie endpoints
only when it is opted in too. A client-only setting can therefore produce an
HTML response or 404 from later handlers. The /set body limit is 4096 bytes;
larger requests return HTTP 413. See
cookie endpoint troubleshooting for the
routes, version boundary, and diagnostic checks. Meteor 3.6's
[email protected] also requires trusted origins and valid tokens,
uses SameSite=Strict, and adds a separate per-address endpoint rate limit.
These protections are also backported in Meteor 3.5.5's [email protected].
Review custom callers and cross-site entry flows before upgrading. Distinguish invalid sessions from transient or
rate-limit responses before retrying or discarding credentials.
// server/oauth.js
import { ServiceConfiguration } from "meteor/service-configuration";
await ServiceConfiguration.configurations.upsertAsync(
{ service: "google" },
{
$set: {
clientId: process.env.GOOGLE_CLIENT_ID,
secret: process.env.GOOGLE_CLIENT_SECRET,
loginStyle: "popup",
},
},
);
// client
Meteor.loginWithGoogle(
{ requestPermissions: ["email", "profile"] },
(err) => { if (err) console.error(err); },
);
loginStyle: "redirect" for mobile or environments without
window.close / window.opener. Each provider ships its own
accounts-<service> package: accounts-google, accounts-github,
accounts-facebook, accounts-twitter, accounts-apple,
accounts-meetup, accounts-weibo.
For native Google/Facebook login, see native token validation. For production setup on 3.4.4, 3.5.5 and 3.6.1, use server configuration; see client configuration restrictions.
For accounts-express authenticated fetch, check the resolved version and
trusted destinations before forwarding
credentials to another origin. Cookie endpoint and fetch allowlists are separate.
For provider and per-user credential encryption, use oauth-encryption
and top-level Accounts.config({ oauthSecretKey }). See meteor-security
and the OAuth reference for supported fields and key requirements.
The 3.4.4, 3.5.5 and 3.6.1 security releases add verification-link expiry and password-change revocation. Follow password flows for exact package pairings, configuration and earlier-version behavior.
Use the client callbacks for forgotPassword, resetPassword and
verifyEmail; await their server email APIs. The reference also covers
Accounts.urls and email-template customization, stale links and 2FA.
Add accounts-passwordless. Request a one-time code or link, then submit the
code with the same selector:
Accounts.requestLoginTokenForUser(
{
selector: { email },
userData: { email },
options: { userCreationDisabled: false },
},
(error) => { if (error) console.error(error); },
);
Meteor.passwordlessLoginWithToken(
{ email },
token,
(error) => { if (error) console.error(error); },
);
Set userCreationDisabled: true for sign-in-only flows. Configure
tokenSequenceLength, loginTokenExpirationHours, and the
Accounts.emailTemplates.sendLoginToken template on the server. Treat the
token-request method as an abuse-sensitive endpoint and rate-limit repeated
requests. With Meteor 3.6's [email protected]
and [email protected], the complete request is validated before
lookup/creation and joins the default Accounts DDP rate rule. The 3.4.4 and
3.5.5 backports also validate/throttle requests. See
passwordless request boundaries
for custom callers, one-time completion, 2FA and earlier packages. Retain the
default limiter and handle callback errors without an immediate retry loop.
accounts-2fa adds TOTP. The login flow:
Meteor.loginWithPasswordAsync(user, password) on Meteor
3.5+, or the callback form of Meteor.loginWithPassword on older 3.x.error.error === 'no-2fa-code'.Meteor.loginWithPasswordAnd2faCode(user, password, code, cb).Meteor.settings.public. The client sees
public. Put secrets at the top level of settings.json.accounts-password uses bcrypt; trust it.forbidClientAccountCreation with a method that takes a
password. Same risk.Accounts.config({ ... }) inside a deferred path. Call it at top
level or in Meteor.startup.references/password-flows.mdreferences/oauth-services.mdreferences/eval-cases.mdmeteor-security skill.references/authenticated-fetch.md (opens in a new tab)references/eval-cases.md (opens in a new tab)references/http-only-cookies.md (opens in a new tab)references/oauth-services.md (opens in a new tab)references/password-flows.md (opens in a new tab)references/passwordless-requests.md (opens in a new tab)references/users-collection.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
meteor-auth, accounts-password, oauth, 2fa, passwordless, email-verification
npx claudepluginhub meteor/agent-skills --plugin meteor17 skills in this plugin
/meteor-blazeUse when building or debugging Meteor 3 Blaze interfaces: meteor create --blaze, Spacebars, helpers/events, lifecycle, Tracker, ReactiveVar/ReactiveDict, subscriptions, Promise helpers, #let states, Template.dynamic, Blaze.render, and blaze-hot HMR. Triggers on stale async results, lost reactivity after await, data-context lookup surprises, duplicate DOM integrations, Rspack full reloads, raw HTML in triple braces, jQuery not found, Expected template or null, Template.instance() is null after await, missing event.dataTransfer, Reactive HTML attributes, BLOCKOPEN, TRIPLE template tag, Expected "li" end tag, or Template can't be named. Use this skill when asked about reusable Blaze components, the Blaze PWA scaffold, package/backend selection, Rspack entry imports, or template tests. For Meteor 2 to 3 upgrades, use migrate-to-meteor-3; for unexplained cross-layer failures, meteor-debugging.
/meteor-cli-installationUse when installing, locating, repairing, resetting, or uninstalling the Meteor CLI for Meteor 3 development. Triggers on "meteor: command not found", npx meteor, installer failures, PATH problems, specific Meteor versions, clean reinstall requests, meteor reset, or corrupted dev bundles. Use this skill when the user asks about fresh workstation setup or making a local Meteor command available. For application failures after the CLI starts, use meteor-debugging; for application code upgrades, use migrate-to-meteor-3.
/meteor-community-packagesUse when choosing, evaluating, adopting, configuring, or debugging a package from Meteor's documented community catalog, or moving from a community package to a promoted core package such as roles. Triggers on community package recommendations, Atmosphere vs npm selection, Packosphere maintenance checks, jam:* helpers, Meteor.publish.once, Meteor.publish.stream, meteor-rpc, Wormhole, cluster, mail-preview, meteor add --search, or adopting a Git-hosted Atmosphere package. Use this skill when the user asks which maintained package fits or how its documented integration works. Route Meteor 2-to-3 package failures to migrate-to-meteor-3 and underlying core API design to its owning skill.
/meteor-debuggingUse when diagnosing an unexplained failure in a Meteor 3 application before the failing layer or fix is known. Triggers on server crashes, client-only errors, Errors prevented startup, Meteor App - Error, stuck subscriptions, DDP or WebSocket disconnects, Minimongo/server data mismatches, hanging or flaky tests, slow builds, --inspect, console.log, .only, Playwright traces, Instrumentation lifecycle events, or requests to debug a Meteor app. Use this skill when evidence must distinguish Meteor tool, server, client, data, test, browser, mobile, or production boundaries. For test setup and authoring use meteor-testing; after confirming a domain cause, hand the repair to the owning skill.
/meteor-deploymentUse when deploying a Meteor 3 application. Triggers on meteor build, meteor deploy, Galaxy Push to Deploy, Galaxy Mode, Repository Mode, DEPLOY_HOSTNAME, Docker, Kubernetes, settings.json, METEOR_SETTINGS, MONGO_URL, MONGO_OPLOG_URL, ROOT_URL, PORT, HTTP_FORWARDED_COUNT, NODE_OPTIONS, health checks, pre-deploy commands, hot code push, --architecture os.linux.x86_64, --server-only, or a deployed Node.js version mismatch. Use this skill when the user asks about shipping the app, asks about production config, or asks about containerizing. For Cordova Android/iOS artifacts, signing, and native HCP compatibility use meteor-native; this skill owns the backend deployment.
/meteor-methodsUse when authoring or debugging Meteor methods (Meteor.methods, Meteor.call, Meteor.callAsync). Triggers on argument validation with check(), optimistic UI stubs, latency compensation, Meteor.Error handling, and DDPRateLimiter. Use this skill when the user asks about server-side mutation, asks about rate limiting RPC, or asks about wrapping a method with auth checks.
Other plugins' skills for the same job