[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77RJ995JVYN43EEZFW363CP":3,"skill-same:01M77RJ995JVYN43EEZFW363CP":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M77RJ995JVYN43EEZFW363CP","email-and-password-best-practices",null,"Configure email verification, implement password reset flows, set password policies, and customise hashing algorithms for Better Auth email\u002Fpassword authentication. Use when users need to set up login, sign-in, sign-up, credential authentication, or password security with Better Auth.","Reihantt6\u002Fsns-myagent","Reihantt6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F219822095?v=4","01M77KK94PV8B7C2D9XWXNS8DJ","Mohamad Reihan tegar prasetya","01M77KK958QFMTHYXGXFV7KZ79",2,"MIT","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Femail-and-password-best-practices\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\ndescription: \"Configure email verification, implement password reset flows, set password policies, and customise hashing algorithms for Better Auth email\u002Fpassword authentication. Use when users need to set up login, sign-in, sign-up, credential authentication, or password security with Better Auth.\"\n---\n## Quick Start\n\n1. Enable email\u002Fpassword: `emailAndPassword: { enabled: true }`\n2. Configure `emailVerification.sendVerificationEmail`\n3. Add `sendResetPassword` for password reset flows\n4. Run `npx @better-auth\u002Fcli@latest migrate`\n5. Verify: attempt sign-up and confirm verification email triggers\n\n---\n\n## Email Verification Setup\n\nConfigure `emailVerification.sendVerificationEmail` to verify user email addresses.\n\n```ts\nimport { betterAuth } from \"better-auth\";\nimport { sendEmail } from \".\u002Femail\"; \u002F\u002F your email sending function\n\nexport const auth = betterAuth({\n  emailVerification: {\n    sendVerificationEmail: async ({ user, url, token }, request) => {\n      await sendEmail({\n        to: user.email,\n        subject: \"Verify your email address\",\n        text: `Click the link to verify your email: ${url}`,\n      });\n    },\n  },\n});\n```\n\n**Note**: The `url` parameter contains the full verification link. The `token` is available if you need to build a custom verification URL.\n\n### Requiring Email Verification\n\nFor stricter security, enable `emailAndPassword.requireEmailVerification` to block sign-in until the user verifies their email. When enabled, unverified users will receive a new verification email on each sign-in attempt.\n\n```ts\nexport const auth = betterAuth({\n  emailAndPassword: {\n    requireEmailVerification: true,\n  },\n});\n```\n\n**Note**: This requires `sendVerificationEmail` to be configured and only applies to email\u002Fpassword sign-ins.\n\n## Client Side Validation\n\nImplement client-side validation for immediate user feedback and reduced server load.\n\n## Callback URLs\n\nAlways use absolute URLs (including the origin) for callback URLs in sign-up and sign-in requests. This prevents Better Auth from needing to infer the origin, which can cause issues when your backend and frontend are on different domains.\n\n```ts\nconst { data, error } = await authClient.signUp.email({\n  callbackURL: \"https:\u002F\u002Fexample.com\u002Fcallback\", \u002F\u002F absolute URL with origin\n});\n```\n\n## Password Reset Flows\n\nProvide `sendResetPassword` in the email and password config to enable password resets.\n\n```ts\nimport { betterAuth } from \"better-auth\";\nimport { sendEmail } from \".\u002Femail\"; \u002F\u002F your email sending function\n\nexport const auth = betterAuth({\n  emailAndPassword: {\n    enabled: true,\n    \u002F\u002F Custom email sending function to send reset-password email\n    sendResetPassword: async ({ user, url, token }, request) => {\n      void sendEmail({\n        to: user.email,\n        subject: \"Reset your password\",\n        text: `Click the link to reset your password: ${url}`,\n      });\n    },\n    \u002F\u002F Optional event hook\n    onPasswordReset: async ({ user }, request) => {\n      \u002F\u002F your logic here\n      console.log(`Password for user ${user.email} has been reset.`);\n    },\n  },\n});\n```\n\n### Security Considerations\n\nBuilt-in protections: background email sending (timing attack prevention), dummy operations on invalid requests, constant response messages regardless of user existence.\n\nOn serverless platforms, configure a background task handler:\n\n```ts\nexport const auth = betterAuth({\n  advanced: {\n    backgroundTasks: {\n      handler: (promise) => {\n        \u002F\u002F Use platform-specific methods like waitUntil\n        waitUntil(promise);\n      },\n    },\n  },\n});\n```\n\n#### Token Security\n\nTokens expire after 1 hour by default. Configure with `resetPasswordTokenExpiresIn` (in seconds):\n\n```ts\nexport const auth = betterAuth({\n  emailAndPassword: {\n    enabled: true,\n    resetPasswordTokenExpiresIn: 60 * 30, \u002F\u002F 30 minutes\n  },\n});\n```\n\nTokens are single-use — deleted immediately after successful reset.\n\n#### Session Revocation\n\nEnable `revokeSessionsOnPasswordReset` to invalidate all existing sessions on password reset:\n\n```ts\nexport const auth = betterAuth({\n  emailAndPassword: {\n    enabled: true,\n    revokeSessionsOnPasswordReset: true,\n  },\n});\n```\n\n#### Password Requirements\n\nPassword length limits (configurable):\n\n```ts\nexport const auth = betterAuth({\n  emailAndPassword: {\n    enabled: true,\n    minPasswordLength: 12,\n    maxPasswordLength: 256,\n  },\n});\n```\n\n### Sending the Password Reset\n\nCall `requestPasswordReset` to send the reset link. Triggers the `sendResetPassword` function from your config.\n\n```ts\nconst data = await auth.api.requestPasswordReset({\n  body: {\n    email: \"john.doe@example.com\", \u002F\u002F required\n    redirectTo: \"https:\u002F\u002Fexample.com\u002Freset-password\",\n  },\n});\n```\n\nOr authClient:\n\n```ts\nconst { data, error } = await authClient.requestPasswordReset({\n  email: \"john.doe@example.com\", \u002F\u002F required\n  redirectTo: \"https:\u002F\u002Fexample.com\u002Freset-password\",\n});\n```\n\n**Note**: While the `email` is required, we also recommend configuring the `redirectTo` for a smoother user experience.\n\n## Password Hashing\n\nDefault: `scrypt` (Node.js native, no external dependencies).\n\n### Custom Hashing Algorithm\n\nTo use Argon2id or another algorithm, provide custom `hash` and `verify` functions:\n\n```ts\nimport { betterAuth } from \"better-auth\";\nimport { hash, verify, type Options } from \"@node-rs\u002Fargon2\";\n\nconst argon2Options: Options = {\n  memoryCost: 65536, \u002F\u002F 64 MiB\n  timeCost: 3, \u002F\u002F 3 iterations\n  parallelism: 4, \u002F\u002F 4 parallel lanes\n  outputLen: 32, \u002F\u002F 32 byte output\n  algorithm: 2, \u002F\u002F Argon2id variant\n};\n\nexport const auth = betterAuth({\n  emailAndPassword: {\n    enabled: true,\n    password: {\n      hash: (password) => hash(password, argon2Options),\n      verify: ({ password, hash: storedHash }) =>\n        verify(storedHash, password, argon2Options),\n    },\n  },\n});\n```\n\n**Note**: If you switch hashing algorithms on an existing system, users with passwords hashed using the old algorithm won't be able to sign in. Plan a migration strategy if needed.\n","## Quick Start\n\n1. Enable email\u002Fpassword: `emailAndPassword: { enabled: true }`\n2. Configure `emailVerification.sendVerificationEmail`\n3. Add `sendResetPassword` for password reset flows\n4. Run `npx @better-auth\u002Fcli@latest migrate`\n5. Verify: attempt sign-up and confirm verification email triggers\n\n---\n\n## Email Verification Setup\n\nConfigure `emailVerification.sendVerificationEmail` to verify user email addresses.\n\n```ts\nimport { betterAuth } from \"better-auth\";\nimport { sendEmail } from \".\u002Femail\"; \u002F\u002F your email sending function\n\nexport const auth = betterAuth({\n  emailVerification: {\n    sendVerificationEmail: async ({ user, url, token }, request) => {\n      await sendEmail({\n        to: user.email,\n        subject: \"Verify your email address\",\n        text: `Click the link to verify your email: ${url}`,\n      });\n    },\n  },\n});\n```\n\n**Note**: The `url` parameter contains the full verification link. The `token` is available if you need to build a custom verification URL.\n\n### Requiring Email Verification\n\nFor stricter security, enable `emailAndPassword.requireEmailVerification` to block sign-in until the user verifies their email. When enabled, unverified users will receive a new verification email on each sign-in attempt.\n\n```ts\nexport const auth = betterAuth({\n  emailAndPassword: {\n    requireEmailVerification: true,\n  },\n});\n```\n\n**Note**: This requires `sendVerificationEmail` to be configured and only applies to email\u002Fpassword sign-ins.\n\n## Client Side Validation\n\nImplement client-side validation for immediate user feedback and reduced server load.\n\n## Callback URLs\n\nAlways use absolute URLs (including the origin) for callback URLs in sign-up and sign-in requests. This prevents Better Auth from needing to infer the origin, which can cause issues when your backend and frontend are on different domains.\n\n```ts\nconst { data, error } = await authClient.signUp.email({\n  callbackURL: \"https:\u002F\u002Fexample.com\u002Fcallback\", \u002F\u002F absolute URL with origin\n});\n```\n\n## Password Reset Flows\n\nProvide `sendResetPassword` in the email and password config to enable password resets.\n\n```ts\nimport { betterAuth } from \"better-auth\";\nimport { sendEmail } from \".\u002Femail\"; \u002F\u002F your email sending function\n\nexport const auth = betterAuth({\n  emailAndPassword: {\n    enabled: true,\n    \u002F\u002F Custom email sending function to send reset-password email\n    sendResetPassword: async ({ user, url, token }, request) => {\n      void sendEmail({\n        to: user.email,\n        subject: \"Reset your password\",\n        text: `Click the link to reset your password: ${url}`,\n      });\n    },\n    \u002F\u002F Optional event hook\n    onPasswordReset: async ({ user }, request) => {\n      \u002F\u002F your logic here\n      console.log(`Password for user ${user.email} has been reset.`);\n    },\n  },\n});\n```\n\n### Security Considerations\n\nBuilt-in protections: background email sending (timing attack prevention), dummy operations on invalid requests, constant response messages regardless of user existence.\n\nOn serverless platforms, configure a background task handler:\n\n```ts\nexport const auth = betterAuth({\n  advanced: {\n    backgroundTasks: {\n      handler: (promise) => {\n        \u002F\u002F Use platform-specific methods like waitUntil\n        waitUntil(promise);\n      },\n    },\n  },\n});\n```\n\n#### Token Security\n\nTokens expire after 1 hour by default. Configure with `resetPasswordTokenExpiresIn` (in seconds):\n\n```ts\nexport const auth = betterAuth({\n  emailAndPassword: {\n    enabled: true,\n    resetPasswordTokenExpiresIn: 60 * 30, \u002F\u002F 30 minutes\n  },\n});\n```\n\nTokens are single-use — deleted immediately after successful reset.\n\n#### Session Revocation\n\nEnable `revokeSessionsOnPasswordReset` to invalidate all existing sessions on password reset:\n\n```ts\nexport const auth = betterAuth({\n  emailAndPassword: {\n    enabled: true,\n    revokeSessionsOnPasswordReset: true,\n  },\n});\n```\n\n#### Password Requirements\n\nPassword length limits (configurable):\n\n```ts\nexport const auth = betterAuth({\n  emailAndPassword: {\n    enabled: true,\n    minPasswordLength: 12,\n    maxPasswordLength: 256,\n  },\n});\n```\n\n### Sending the Password Reset\n\nCall `requestPasswordReset` to send the reset link. Triggers the `sendResetPassword` function from your config.\n\n```ts\nconst data = await auth.api.requestPasswordReset({\n  body: {\n    email: \"john.doe@example.com\", \u002F\u002F required\n    redirectTo: \"https:\u002F\u002Fexample.com\u002Freset-password\",\n  },\n});\n```\n\nOr authClient:\n\n```ts\nconst { data, error } = await authClient.requestPasswordReset({\n  email: \"john.doe@example.com\", \u002F\u002F required\n  redirectTo: \"https:\u002F\u002Fexample.com\u002Freset-password\",\n});\n```\n\n**Note**: While the `email` is required, we also recommend configuring the `redirectTo` for a smoother user experience.\n\n## Password Hashing\n\nDefault: `scrypt` (Node.js native, no external dependencies).\n\n### Custom Hashing Algorithm\n\nTo use Argon2id or another algorithm, provide custom `hash` and `verify` functions:\n\n```ts\nimport { betterAuth } from \"better-auth\";\nimport { hash, verify, type Options } from \"@node-rs\u002Fargon2\";\n\nconst argon2Options: Options = {\n  memoryCost: 65536, \u002F\u002F 64 MiB\n  timeCost: 3, \u002F\u002F 3 iterations\n  parallelism: 4, \u002F\u002F 4 parallel lanes\n  outputLen: 32, \u002F\u002F 32 byte output\n  algorithm: 2, \u002F\u002F Argon2id variant\n};\n\nexport const auth = betterAuth({\n  emailAndPassword: {\n    enabled: true,\n    password: {\n      hash: (password) => hash(password, argon2Options),\n      verify: ({ password, hash: storedHash }) =>\n        verify(storedHash, password, argon2Options),\n    },\n  },\n});\n```\n\n**Note**: If you switch hashing algorithms on an existing system, users with passwords hashed using the old algorithm won't be able to sign in. Plan a migration strategy if needed.\n",{"description":7},"main","58843b159d7a4050d6b785a98b908cce505c0b92","agent\u002Fskills\u002Femail-and-password-best-practices",0,"https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent","https:\u002F\u002Fgithub.com\u002FReihantt6","reihsns.web.id","2026-08-19 20:08:18",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add Reihantt6\u002Fsns-myagent --skill email-and-password-best-practices",{"tool":38,"command":39},"bunx","bunx skills add Reihantt6\u002Fsns-myagent --skill email-and-password-best-practices",{"tool":41,"command":42},"pnpm","pnpm dlx skills add Reihantt6\u002Fsns-myagent --skill email-and-password-best-practices","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Femail-and-password-best-practices\u002FSKILL.md",true,[],[47,54,61,68,75,82],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M77XDCYZ407XYMF2T4P6F7VT","youtube-transcript","Extract transcripts from YouTube videos. Use when the user asks for a transcript, subtitles, or captions of a YouTube video and provides a YouTube URL (youtube.com\u002Fwatch?v=, youtu.be\u002F, or similar). Supports output with or without timestamps.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fyoutube-transcript\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M77XD7PBC98J6MXGJJ2TJ8DX","youtube-thumbnail-design","YouTube thumbnail design with specific dimensions, contrast rules, and mobile preview optimization. Covers safe zones, text placement, face expression psychology, and A\u002FB testing. Use for: YouTube thumbnails, video cover images, click-through optimization. Triggers: youtube thumbnail, thumbnail design, video thumbnail, click through rate, ctr optimization, youtube cover, video cover image, thumbnail maker, thumbnail tips, youtube design, video preview image","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fyoutube-thumbnail-design\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M77XD2541C8HXJ6RHYZP4NGJ","youtube-short-maker","Make YouTube Shorts that hold attention with Pexo — vertical 9:16, fast-paced, hook in the first 3 seconds. Describe your topic and Pexo writes the script, generates the shots, picks the models, and assembles a finished Short with music and captions. Use for YouTube Shorts: \"youtube short\", \"make a youtube short\", \"shorts video\", \"short-form video\". NOT for long-form or landscape video.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fyoutube-short-maker\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M77XCXKVSYK7KTZ3PQBVVGFD","xcode-project-setup","Safely modifies Xcode projects (.pbxproj) to add Swift Packages and link files. Use this skill whenever an iOS project needs dependencies installed (e.g. Firebase, Alamofire).","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fxcode-project-setup\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M77XCR1DV8ZQK2NHWKVY4EWX","x402","Set up Browser Use Cloud payments with x402 — pay per request from a crypto wallet (USDC on Base mainnet), no signup or API key. Two setups it works out up front — \"just use it\" (set up a wallet so you or Claude Code can run cloud browser tasks paid from the wallet — Claude writes and runs throwaway scripts, nothing touches your codebase) or \"build it in\" (install the SDK and write the key + code into your project). Walks through wallet setup, funding, .env, and a ~$1 test run. Use when the user asks about x402, pay-per-use, USDC payments, or wants Browser Use Cloud without an API key. For the free-tier signup (reverse-CAPTCHA → API key), use `browser-use cloud signup` or the `cloud` skill instead.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fx402\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M77XCMD3R3ZBZQQSW6E0793B","x-twitter-scraper","Build GitHub Copilot workflows with Xquik X API SDKs, REST endpoints, hosted Apify Actor runs, MCP tools, TweetClaw OpenClaw plugin installs, signed webhooks, tweet search, user lookup, follower exports, media actions, and agent automation.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fx-twitter-scraper\u002FSKILL.md",[],[]]