Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: user auth #34

Merged
merged 13 commits into from
Sep 11, 2024
Merged

feat: user auth #34

merged 13 commits into from
Sep 11, 2024

Conversation

choffmann
Copy link
Member

Close #16

  • redirect to login when user is not authenticated
  • logout
  • refactor store
  • all pages are protected

@choffmann choffmann added this to the Release 1 milestone Sep 4, 2024
@choffmann choffmann self-assigned this Sep 4, 2024
@choffmann choffmann added the need-reviewer Send notification in Discord label Sep 4, 2024
<Footer />
</FakeTreeDataContextProvider>
</TreeDataContextProvider>
<ReactQueryDevtools initialIsOpen={false} position="bottom" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to get the a variable out of the .env? We could hide the dev tools on production.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is hidden when the release version is created, or when NODE_ENV is set to production.


export const Route = createFileRoute('/')({
export const Route = createFileRoute('/_protected/')({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the route for the dashboard .../_protected/dashboard?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tanstack Router ignores paths that begin with _. This makes it possible to store files in a folder without creating a route through this folder. Thus _protected/map becomes /map. All files located in this _protected folder are regarded as a ‘protected’ resource. If a path is to be freely accessible, the file only needs to be moved from the _protected folder and is then freely available under the same URL.

@choffmann choffmann merged commit d043ae8 into develop Sep 11, 2024
1 check passed
@choffmann choffmann deleted the feature/user-auth branch September 11, 2024 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need-reviewer Send notification in Discord
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement user auth
2 participants