我在Azure云平台上有一个带有移动应用程序的App Service。 后端API是使用Node.js中的 Easy API </ em>制作的。 在同一个资源组中,还有一个SQL Server和一个SQL数据库。 客户端应用程序(Android,iOS和Angular,PHP或Python中的Web应用程序)必须进行身份验证才能调用API应用程序。 </ p>

我对身份验证机制非常困惑。 我想在iOS,Android和Web应用程序中为我的用户创建一个登录页面,但我不知道如何设计身份验证机制。 潜在用户将是下载移动应用程序和一些高级客户端的所有客户。 </ p>

我应该选择Azure Active Directory解决方案,还是应该使用数据库作为存储来实现? </ p>
</ div>



I have an App Service with a Mobile App in Azure cloud platform. The backend API is made using the Easy APIs in Node.js. In the same Resource Group there is also a SQL Server and a SQL Database. The client applications(Android,iOS and a Web app in Angular, PHP or Python) have to authenticate in order to call the API apps.

I am very confused regarding the authentication mechanisms. I want to make a login page for my users in the iOS, Android and Web application but I don't know how to design the authentication mechanism. Potential users will be all the clients who download the mobile applications and a few premium clients.

Should I pick the Azure Active Directory solution or should I make my implementation using the database as storage?


实际上,Node.js后端的Azure Mobile Apps是在Azure App Services上运行的express.js应用程序。 以及express.js中间件中的Mobile-Apps-SDK。 所以这取决于你的要求。 mobile-apps-sdk中的默认身份验证机制是通过Azure网关身份验证实现的。 您也可以实现自己的自定义身份验证。</ p>

如果您可以控制您的移动应用,并且只想使用常规的Facebook,Twitter,Google和Microsoft登录控件,那么请使用 Azure移动应用程序中提供的Azure网关,用于获取移动应用程序令牌。 有适用于iOS,Android,Apache Cordova和Xamarin的控件。 您还可以执行重定向以使用Web。 您可以参考添加身份验证 到您的Android应用程序 </ p>

否则,您可以自定义身份验证并可以提供自己的令牌生成器。 您可以使用第三方身份验证提供程序,如Auth0。</ p>

您可以参考 了解更多信息。</ p>
</ div>



Actually, Azure Mobile Apps in Node.js backend are express.js applications running on Azure App Services. And the Mobile-Apps-SDK in a middleware of express.js. So it depends your requirement. The default authentication mechanism in mobile-apps-sdk is implemented via Azure gateway auth. Also you can implement your own custom auth.

If you have control over your mobile app and you want to just use the regular Facebook, Twitter, Google and Microsoft sign-in controls, then use the Azure gateway available in Azure Mobile Apps to get a mobile apps token. There are controls available for iOS, Android, Apache Cordova and Xamarin. You can also do a redirect to use the web. You can refer to Add authentication to your Android app

Otherwise, you can custom authentication and can provide your own token generator. You can use a third party authentication provider like Auth0.

You can refer to for more information.

Csdn user default icon