TheForgottenMaverick
TheForgottenMaverick
CC#
Created by Obel on 6/15/2023 in #help
❔ Retrieving a token from a login function
You can create a model "LoginResponse" which will have both token and the responseObject object as its properties. For example -
public class LoginResponseDto
{
public User User { get; set; }
public string Token { get; set; }
}
public class LoginResponseDto
{
public User User { get; set; }
public string Token { get; set; }
}
I'm using the above model in a personal project I'm working on.
3 replies