Skip to content

Setting up authentication to check if user is logged in #66

@jellyfangs

Description

@jellyfangs

Hi,

I'm looking to set up the router to have this flow:

  • If logged out then show Login/Register route
  • if logged in then show Home route

Can anyone give me some hints what I need to set up for that to happen?

Should I make a constructor that checks to see if an user is logged in/out then set the initial={true} or {false}? Or should I rather redirect based on actions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions