Skip to content

[Feature] Auth Route Guards & Onboarding Navigation Logic #115

Description

@Basharkhan7776

Implement client-side and layout route guards to enforce authentication and guide new users through onboarding.

  • Create useRequireAuth hook to protect routes like /dashboard, /create, /forms/*, /templates/create.
  • Create AuthGuard layout wrapper for protected route segments.
  • Implement navigation logic: After OAuth login, inspect user profile state (username, fullName). If incomplete, redirect to /onboarding; otherwise redirect to /dashboard.
  • Handle automatic session expiration, 401 response handling, and clear logout cleanup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions