Skip to content

Chapter 15 - Enabling Redirect in signOut #907

@TIMN00

Description

@TIMN00

Hi,

In Chapter 15 of the nextJS dashboard documentation, the signOut does not redirect to the login page given the sample code. I have added the following in /sidenav.tsx :

<form
                    action={async () => {
                        'use server';
                        await signOut({redirect: false});
                        redirect('/login');
                    }}
                >

Perhaps an update to the documentation should be made?

Hope this helps.

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