Skip to content

Documentation: Deprecated method in Tutorials/nextjs/step-4Β #2489

@fabiorodriguesroque

Description

@fabiorodriguesroque

πŸ’­ Description

Hi everyone πŸ™‹πŸ»β€β™‚οΈ

While following the Next.js tutorial, I noticed a deprecated method being used in the useAuth hook.

Current code:

const logout = async (): Promise<void> => {
  await account.deleteSession('current');
  setCurrent(null);
  router.push('/');
};

as deleteSession method now expects an object parameter, should be updated to

 await account.deleteSession({ sessionId: 'current' });

Please confirm if I’m correct, and feel free to assign this to me. Even though it’s a small change.

πŸ‘€ Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏒 Have you read the Code of Conduct?

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions