Nik
07/23/2024, 9:42 PM[Authorize(Policy = AuthorizationPolicies.BackOfficeAccess)]
My understanding is that this will protect my C# api behind the Umbraco backoffice login.
I've then made sure my API controller shows in Swagger and from that generated an open-api TS client using the @hey-api/openapi-ts
tooling.
Both of these bits seem to have worked, however the issue I've got now, is that when I call my api using the ts generated client I'm getting a 401 unathorised error and my controller isn't hit at all.
The error I get is in the associated image and the code that calls my TS client looks like this:
ts
var currentNotFound = await tryExecuteAndNotify(this, PageNotFoundManagerService.getApiV1HcsGetNotFound( {pageId: this.args.unique} ));
https://cdn.discordapp.com/attachments/882984798719729704/1265423842650882209/image.png?ex=66a1754a&is=66a023ca&hm=fe470f3792748163383e005e1fa9037a41e30e24ecc550fa9ffda7bdf9471e4d&Nik
07/23/2024, 9:52 PM