設置:Azure的移動應用客戶端 - invokeApi未經授權
使用JS庫和下面的我的C#Xamarin項目的客戶端登錄/驗證流程。
CORS是建立和初始登錄是罰款:
this.client = new WindowsAzure.MobileServiceClient(<endpoint>);
this.client.login(<provider>);
我存儲返回「用戶id」和「mobileServiceAuthenticationToken」以備將來使用。
問題:
調用天青-移動應用程序的客戶端的invokeApi:
this.client.invokeApi("myCustomerController", { method: 'GET' })
回報:
401(未授權)
上午我錯過了什麼?我期待客戶準備打電話給我的後端服務。
我試過登錄後直接使用現有的客戶端沒有成功。
設置新客戶端的「userId」和「mobileServiceAuthentication token」時也失敗。
我調用的自定義ApiController在從其他地方(如C#MobileServiceClient)調用時工作正常。
獲取invokeApi調用的跟蹤並查看標頭是什麼。可能發佈他們? –