Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Replace User Context with User machine #435

Closed
Assignees
presleyp
Labels
siteArea: frontend dashboard
Milestone
@presleyp

Description

@presleyp

In accordance withhttps://www.notion.so/coderhq/v2-Frontend-State-Management-APPROVED-e5ccb3c6357649f9a9dc1a1b2a1b7a99, we will use a machine to encapsulate API calls about the current user and hold user state.

  • replaceUserContext withuserMachine
  • refactor all checks for authentication
  • refactorSignInPage to useuserMachine

Requirements:
Given a current user created in the database,

  • user can log in
  • user can log out
  • logged in user can view pages that require authentication
  • logged in user on /login gets redirected to /projects
  • logged out user cannot view pages that require authentication, and is redirected to /login. Upon logging in, the user is returned to the page they were trying to access.
  • logged out user can view /login and 404 page

Implementation goals:

Testing goals:

  • Storybook NavbarView
  • Storybook SignInForm
  • TBD mix of unit, integration, e2e tests to cover auth behavior

Metadata

Metadata

Assignees

Labels

siteArea: frontend dashboard

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp