Is this way of identify user by api secure and good practice?
āUnsolvedāQuestion
Hi, can someone help me with security of this, if this approach is secure, just ok, or if introduces security problems and has better ways to do that. I'm using a custom UI completely customized in react and using the backend to communicate with Zitadel, this is how i'm identifying the user. I know that i need to make some session checks but i'm asking myself if its ok or have improved ways to do that:
public class UserIdentifierImpl(TcktContext context) : IUserIdentifier { public async Task<Guid> GetUserIdentifier(HttpRequest request) { request.Cookies.TryGetValue("BearerCookieName", out var tokenId); request.Cookies.TryGetValue("SessionId", out var sessionId);