Open
Description
Which project does this relate to?
Start
Describe the bug
I think it's reasonable to expect that in the start-basic-auth example, the posts should only be accessible if you're logged in.
But in fact they are accessible without logging in. i.e. the example is a poor demonstration of how to actually secure the posts information.
Your Example Website or App
The issue can be seen on the codesandbox from the docs.
Steps to Reproduce the Bug or Issue
- Open the codesandbox linked above
- In the codesandbox preview, edit the URL so that it ends with
/_server/app_utils_posts_ts--fetchPosts_createServerFn_handler?payload=%7B%22data%22%3A%7B%22%24undefined%22%3A0%7D%2C%22context%22%3A%7B%7D%7D
, then hit enter to go to this page. You successfully retrieve the posts as JSON, despite not being logged in. - Do the same for
/_server/app_utils_posts_ts--fetchPost_createServerFn_handler?payload=%7B%22data%22%3A%223%22%2C%22context%22%3A%7B%7D%7D
and see that you get a single post in the response
Expected behavior
When following the start-basic-auth example, it shouldn't be possible to get the posts without being properly authenticated.
Screenshots or Videos
Platform
not relevant
Additional context
No response