auth-work

Implement Wix member authentication with useMembers hook and protected-route redirects.

Updated Mar 27, 2026
One-click install
npx skills add https://github.com/madmaxfarm105-hue/Comando --skill auth-work-madmaxfarm105-hue
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: auth-work
Source: https://github.com/madmaxfarm105-hue/Comando/tree/main/.emdash/skills/auth-work
Command: npx skills add https://github.com/madmaxfarm105-hue/Comando --skill auth-work-madmaxfarm105-hue

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the challenge of implementing authentication safely and consistently in a Wix-integrated app without creating fragile custom login flows.

Core Features & Use Cases

  • Use Wix Member Features for login state: Use the useMembers hook to access loggedInMember / member and determine whether a user is authenticated.
  • Build protected routes correctly: Redirect unauthenticated users to /login while using loading/guard patterns to avoid rendering protected content prematurely.
  • Implement a single, standards-based login page: Enforce a single login page at /login and support return-url behavior so users resume where they left off.

Quick Start

Apply the Member Features useMembers hook in your components, then protect routes by redirecting unauthenticated users to /login and creating the one /login page route that handles redirect-back after successful sign-in.

Frequently Asked Questions about auth-work

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I protect routes in a Wix member app and redirect unauthenticated users to login?▼

Use the Wix member-features `useMembers` hook to check if `loggedInMember` is authenticated, then redirect unauthenticated users to `/login` while using loading guards to prevent rendering protected content prematurely.

How do I get the current logged-in member state in a Wix React app?▼

Access the logged-in member state in Wix by using the `useMembers` hook from Wix member-features, which exposes the `loggedInMember` and `member` objects needed to determine user authentication status for your components.

What is the correct pattern for Wix login page redirect-back behavior?▼

Correct Wix login redirect-back behavior requires enforcing a single `/login` page route that supports return-url parameters, redirecting users back to their original protected route after successful sign-in so they resume navigation seamlessly.

Do I need to build a custom authentication flow for my Wix member-based application?▼

You do not need a custom authentication flow for Wix member apps. Avoid building custom login flows and rely entirely on the Wix member-features `useMembers` hook to securely handle authentication state and route guarding.

Why does protected content flash before redirecting on my Wix member routes?▼

Protected content flashes on Wix member routes because the component renders before the authentication state finishes loading. Apply a loading guard pattern using the `useMembers` hook to conditionally render UI only after the state resolves.