单页应用程序:移到生产环境Single-page application: Move to production

现在你已了解如何获取用于调用 Web API 的令牌,接下来了解如何移到生产环境。Now that you know how to acquire a token to call web APIs, learn how to move to production.

改进应用Improve your app

启用日志记录使应用生产环境准备就绪。Enable logging to make your app production ready.

测试集成Test your integration

按照 Microsoft 标识平台集成清单测试你的集成。Test your integration by following the Microsoft identity platform integration checklist.

部署你的应用Deploy your app

请查看部署示例,了解如何使用 Azure 存储和 Azure 应用服务分别部署 SPA 和 Web API 项目。Check out a deployment sample for learning how to deploy your SPA and Web API projects with Azure Storage and Azure App Services, respectively.

后续步骤Next steps

  • 深入了解快速入门示例,该示例介绍的代码说明了如何使用 MSAL.js 登录用户并获取访问令牌来调用 Microsoft Graph APIJavaScript SPA 教程Deep dive of the quickstart sample, which explains the code for how to sign in users and get an access token to call the Microsoft Graph API by using MSAL.js: JavaScript SPA tutorial.

  • 此示例演示如何使用 MSAL.js 为自己的后端 Web API (ASP.NET Core) 获取令牌:使用 ASP.NET 后端的 SPASample that demonstrates how to get tokens for your own back-end web API (ASP.NET Core) by using MSAL.js: SPA with an ASP.NET back-end.

  • 此示例演示如何使用 passport-azure-ad 验证后端 Web API (Node.js) 的访问令牌:Node.js Web API (Azure AD)Sample that demonstrates how to validate access tokens for your back-end web API (Node.js) by using passport-azure-ad: Node.js Web API (Azure AD.

  • 此示例演示如何使用 MSAL.js 在向 Azure Active Directory B2C (Azure AD B2C) 注册的应用中登录用户:使用 Azure AD B2C 的 SPASample that shows how to use MSAL.js to sign in users in an app that's registered with Azure Active Directory B2C (Azure AD B2C): SPA with Azure AD B2C.

  • 此示例演示如何使用 passport-azure-ad 为向 Azure Active Directory B2C (Azure AD B2C) 注册的应用验证访问令牌:Node.js Web API (Azure AD B2C)Sample that shows how to use passport-azure-ad to validate access tokens for apps registered with Azure Active Directory B2C (Azure AD B2C): Node.js Web API (Azure AD B2C).