0
我使用Xamarin Forms和Auth0。後端是Azure移動應用程序(而不是Azure移動服務),其中數據庫未綁定。Auth0 Xamarin和Azure移動應用程序集成
我的身份驗證在Android中正常工作。我只是不知道如何傳遞這個信息到後端服務,一旦做到這一點:通過Auth0給出
public static MobileServiceClient client = new MobileServiceClient (
Constants.applicationURL, Constants.gatewayURL,
Constants.applicationKey);
public async void Login()
{
await DependencyService.Get<LoginApp.IAuth0WidgetLogin>().LoginUseAuth0EmbeddedWidget();
App.client.CurrentUser = User.UserName;
App.client.CurrentUser.MobileServiceAuthenticationToken = User.jwt;
}
例子是在與一些腳本在Azure的門戶中的每個表的表級權限。但我的數據庫並不在那裏。
我寧願選擇一些代碼,如this。
如果可以在後端服務中取回用戶配置文件,那麼最好使用該名稱來執行審計日誌。也許使用授權令牌
var api = await auth0.GetDelegationToken("{THE WAMS CLIENT ID IN AUTH0}");