返回 Skill 列表
extension
分类: 开发与工程无需 API Key

managing-auth-pipeline

处理包括登录、注册、OAuth和密码恢复在内的认证流程。在构建认证页面或逻辑时使用。

person作者: jakexiaohubgithub

Authentication Pipeline

When to use this skill

  • Developing the /auth directory.
  • Implementing "Sign in with Google" or "GitHub".
  • Handling session persistence in Next.js.

Workflow

  • [ ] Create auth forms (Signup/Login).
  • [ ] Implement account.create() and account.createEmailPasswordSession().
  • [ ] Set up OAuth redirection using account.createOAuth2Session().
  • [ ] Handle logout with account.deleteSession('current').

Key Logic

  • OAuth: Ensure redirect URLs are correctly whitespaced in Appwrite Console.
  • Persistence: Appwrite handles cookies automatically in the browser; use Middleware for route protection.

Instructions

  • Error Feedback: Use toast notifications for "Invalid credentials" or "Email already exists".
  • Social Auth: Prioritize Google/GitHub for premium UX.