I have an endpoint where the user can confirm the email address.
This endpoint also logs the user in.
After switching to ServiceStack 6.* the new UseTokenCookie = true
changes such that BearerToken
is no longer returned, when I do a nested call to authenticate:
var authService = ResolveService<AuthenticateService>();
var authRequest = new Authenticate
{
provider = AuthenticateService.CredentialsProvider,
UserName = user.MobilePhone,
};
var httpResult = await authService.PostAsync(authRequest);
var authResponse = httpResult.GetResponseDto() as AuthenticateResponse;
However when returning a result, I wish to pass on any cookies set by the internal authentication. When inspecting, there doesn’t appear to be any cookies set by authService.PostAsync(authRequest)
.
After looking at the source code of AuthenticateService
I do notice that the ExecuteAsync
method of JwtAuthProvider
is called when there is in process authentication.
When there is regular direct authentication the ResultFilterAsync
is called.
Is this a bug?
Or is there a way to call SuccessAuthResultAsync
from AuthFeature
using the httpResult
of the authentication to solve this?