© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•13mo ago•
4 replies
Zoli

User ID on Client Side or Not?

Hi,

I’m building a Feed application, somewhat like Facebook. So far, I’ve implemented it in a way that avoids fetching or using user IDs on the client side. For example, when fetching posts or liking/commenting on one, I send a request to the server with just the post ID. On the server side, I handle the like or comment by finding the post using its ID, which is tied to a user ID, and update it as needed. This way, I don’t need to use the user ID on the client side. Similarly, when fetching data for myself as an authenticated user, I get my user ID directly from my identity on the server, so there’s no need to pass my user ID explicitly.

However, if I want to implement a profile page, I’ll need to locate and display a specific user’s profile. For this, I assume I’ll need the user ID available on the client side. Would this approach be fine?
What is your opinion about?

Thanks in advance!
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ Server side or Client side?
C#CC# / help
3y ago
client-side form validation
C#CC# / help
2y ago
✅ ClaimTypes.NameIdentifier not retruning id of current user
C#CC# / help
2y ago
❔ third party login should be on web api side or blazor side?
C#CC# / help
4y ago