Skip to content

Redirect guests to login in Subscribed middleware#385

Closed
produktive wants to merge 1 commit into
thedevdojo:mainfrom
produktive:fix/subscribed-guest-redirect
Closed

Redirect guests to login in Subscribed middleware#385
produktive wants to merge 1 commit into
thedevdojo:mainfrom
produktive:fix/subscribed-guest-redirect

Conversation

@produktive

Copy link
Copy Markdown
Contributor

Summary

  • Check authentication before subscription status in Subscribed middleware
  • Guests now redirect to login with intended URL instead of the billing page

Motivation

When subscribed middleware runs for a guest, the previous logic fell through to route('billing'), which is confusing for unauthenticated visitors.

Test plan

  • Guest hitting a subscribed-protected route redirects to login
  • Authenticated non-subscriber still redirects to billing
  • Authenticated subscriber/admin proceeds normally

Made with Cursor

Prevents unsubscribed middleware from sending unauthenticated users to billing instead of login.

Co-authored-by: Cursor <cursoragent@cursor.com>
@produktive

Copy link
Copy Markdown
Contributor Author

Superseded by #386, which includes this Subscribed middleware change.

@produktive produktive closed this Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant