How alqasmii/zeropass-auth works
Project type and purpose
• This is a small Node.js-based “magic link” authentication plugin (ZeroPass Auth) meant to be installed into Bubble applications.
• Its purpose is to eliminate passwords by generating one-time login links, emailing them to users, and verifying them on click.
File structure
• Top‐level files:
• index.js – the entry point that exposes the plugin’s API endpoints (e.g., requestMagicLink, verifyMagicLink).
• generateToken.js – encapsulates logic to create, sign, and store a one‐time token.
• package.json / package-lock.json – Node.js dependencies.
• node_modules – installed libraries (e.g., JWT, email-sending SDK).
• No dedicated “src” or “lib” directories, but the two JS files separate concerns (API vs. token logic).
• No database code here, implying reliance on an external persistence service (e.g., Redis, DynamoDB) or Bubble’s built-in database.
README for additional insights
• Describes plugin features: secure magic link via email, improved security & user experience.
• Layer 1 (Frontend): Bubble App UI.
• Layer 2 (Backend API): index.js endpoints → calls generateToken.js.
• Layer 3 (Data): Persistence Store for tokens.
• Layer 4 (External): Email Provider → end‐user.