I am using Blazor WebWebAssembly as my frontend and AWS Cognito as my IDP.
I can successfully login to AWS Cognito, but not able to get the access token with the following code because of the “X-Frame-Options“ directive set to “DENY“ error.
private async Task WriteTokenToConsole()
{
var tokenResult = await TokenProvider.RequestAccessToken();
if (tokenResult.TryGetToken(out var token))
{
System.Diagnostics.Debug.WriteLine(token.Value);
}
}
Yet, if I switch the IDP to Identity Server 4, I can get the access token no problem.
According to this comment https://github.com/dotnet/aspnetcore/issues/22651#issuecomment-640565340 , it is because Cognito is not being standard compliant?
Is there a way to work around this?
Thank you