Skip to content

Commit 31cdd65

Browse files
author
John Luo
committed
Remove accepted scope check for non-Identity.Web scenarios
1 parent 7f7528f commit 31cdd65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/Controllers/WeatherForecastController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
using Microsoft.Graph;
1616
#endif
1717
using Microsoft.AspNetCore.Mvc;
18-
#if (OrganizationalAuth || IndividualB2CAuth)
18+
#if (OrganizationalAuth || (IndividualB2CAuth && !Hosted))
1919
using Microsoft.Identity.Web.Resource;
2020
#endif
2121
using Microsoft.Extensions.Logging;
@@ -101,7 +101,7 @@ public WeatherForecastController(ILogger<WeatherForecastController> logger)
101101
[HttpGet]
102102
public IEnumerable<WeatherForecast> Get()
103103
{
104-
#if (OrganizationalAuth || IndividualB2CAuth)
104+
#if (OrganizationalAuth || (IndividualB2CAuth && !Hosted))
105105
HttpContext.VerifyUserHasAnyAcceptedScope(scopeRequiredByApi);
106106

107107
#endif

0 commit comments

Comments
 (0)