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

HTTP proxy authorization / permissions example #1455

Closed
thruflo opened this issue Jul 19, 2024 · 0 comments · Fixed by #1566
Closed

HTTP proxy authorization / permissions example #1455

thruflo opened this issue Jul 19, 2024 · 0 comments · Fixed by #1566
Labels

Comments

@thruflo
Copy link
Contributor

thruflo commented Jul 19, 2024

The example is a one page app showing a list of projects (or whatever). There are two roles, admin and user. The admin can see all projects and the user can see only ones that they own.

The shape calls should proxy through the API similar to the next.js or remix examples and set the where clause for the user role so it filters down projects.

At the top of the page, you can click to become the admin or one of 3 users. That'll set a query string with the role of the user and then refresh the page so the app re-fetches the right shape.

Use a custom fetchClient to set custom auth headers.

@KyleAMathews KyleAMathews transferred this issue from electric-sql/archived-electric-next Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants