Server-Side Kotlin with Ktor · JWT Authentication |

This is a companion discussion topic for the original entry at

am I not already getting a user by id using the “user” method?

1 Like

I’m also having the same problem. I’m not getting the the user by Id. Did you resolve the problem? Can u share it

Thanks for the questions @eoin_a and @lsp_stan!

The userById method is used as part of the token validation for a user that has a JWT token. The user method, in contrast, is used when logging in a user with a password hash. Better names for those methods may have made sense here. But let me know if that helps.

Thanks again!