PassageUnAuthGuard

The opposite of PassageAuthGuard ensures a user is NOT authenticated to view the content.

A component can be passed in which will render when the user is authenticated. The default is to render null.

src/login.tsx
import React from 'react';
import { PassageUnAuthGuard } from '@passageidentity/passage-react';
 
export const UnAuthOnlyPage: React.FC = () => {
    return (
        <PassageUnAuthGuard>
            <p>Protected content</p>
        </PassageUnAuthGuard>
    );
};

Props

NameRequiredTypeDescription
authCompNoReact.ReactNodeComponent to render if the user is authenticated