Skip to content

Authentication: Add magic link login #115

@Ayush8923

Description

@Ayush8923

Is your feature request related to a problem?
Users can only log in via Google OAuth or by using an X-API key, limiting access for those without Google accounts or who prefer email-based authentication.

Describe the solution you'd like
Introduce a magic link login flow for email-based sign-in:

  1. Login Modal: Add an email input and a "Continue" button below the Google login option. On submission, call POST /api/v1/auth/magic-link with { "email": "user@example.com" }. Show a "Check your email" confirmation on success or an inline error for issues like "No account found for this email."
  2. Verify Page (/verify?token=xxx): Clicking the login link in the email leads to this page. Call GET /api/v1/auth/magic-link/verify?token=xxx to validate the token, set cookies, and log the user in. Redirect to the dashboard on success or display an error with a retry option on failure.
Original issue

Describe the current behavior
Users can only log in via Google OAuth or by manually adding an X-API key through the Keystore page. There is no way to log in with just an email address, which limits access for users who don't have Google accounts or prefer email-based authentication.

Describe the enhancement you'd like
Add a magic link login flow that allows users to sign in by entering their email address:

  1. Login Modal: Add an email input field with a "Continue" button below the Google login (separated by an "OR" divider). On submit, call POST /api/v1/auth/magic-link with { "email": "user@example.com" }. On success, show a "Check your email" confirmation. On error (e.g. "No account found for this email"), show the error inline under the email field.

  2. Verify Page (/verify?token=xxx): When the user clicks the login link in their email, they land on this page. It calls GET /api/v1/auth/magic-link/verify?token=xxx to validate the token, set cookies, and log the user in. On success, redirect to the dashboard. On failure, show the error with a retry option.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

In Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions