|
|
|
|
|
by johnyeocx
399 days ago
|
|
Maybe we didn't phrase it as well as we should've. We meant to say API routes in general are public, and so the server actions could be called by anyone. Authentication is definitely possible, but we were trying to brainstorm a way where users could have protected routes with as little set up as possible, the ideal being they just pass in customerId into a Provider component We also did think about things like registering an auth function but felt that being able to just pass in customerId would be a magical experience! Definitely acknowledge that the current mechanism has flaws though -- it's really more of an experiment at the moment, and if it does indeed become very popular with users we would implement auth mechanisms like JWT and what not -- though that would kinda be reinventing the wheel |
|
Your encrypted customer ID has the exact same semantics as the original customer ID for an attacker, and is insecure.