I’m using .Net 8 and I am trying to make an Oath request to Acrobat Sign API. I need to send the user to Adobe to authenticate and then they are redirected back to my site with a code. I’m calling the nav manager redirect during home page OnInitialize
method.
<code> var oauthUrl = "https://mysite.na3.adobesign.com/public/oauth/v2?redirect_uri=https://localhost:7164&response_type=code&client_id=xxxxx_xxxxxxxxxx&scope=user_login:self+agreement_write:self";
try
{
NavManager.NavigateTo(oauthUrl);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
</code>
<code> var oauthUrl = "https://mysite.na3.adobesign.com/public/oauth/v2?redirect_uri=https://localhost:7164&response_type=code&client_id=xxxxx_xxxxxxxxxx&scope=user_login:self+agreement_write:self";
try
{
NavManager.NavigateTo(oauthUrl);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
</code>
var oauthUrl = "https://mysite.na3.adobesign.com/public/oauth/v2?redirect_uri=https://localhost:7164&response_type=code&client_id=xxxxx_xxxxxxxxxx&scope=user_login:self+agreement_write:self";
try
{
NavManager.NavigateTo(oauthUrl);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
The NavigateTo
method is throwing an error Exception thrown: 'Microsoft.AspNetCore.Components.NavigationException' in Microsoft.AspNetCore.Components.Server.dll
(really useful!)
I can paste the URL into the browser and it works fine. This should be really simple. What am I missing?