Skip to content

Commit cd58671

Browse files
committed
JS - explain auth used in app
1 parent 70afd0b commit cd58671

File tree

1 file changed

+12
-1
lines changed
  • articles/javascript/how-to/with-web-app/static-web-app-with-swa-cli

1 file changed

+12
-1
lines changed

articles/javascript/how-to/with-web-app/static-web-app-with-swa-cli/introduction.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Intro: Create Static Web Apps using CLI"
33
description: Create a static web app (React and API) and locally develop using the SWA CLI. Run the same code locally and remotely to ensure that customers get the correct web behavior.
44
ms.topic: how-to
5-
ms.date: 08/31/2021
5+
ms.date: 10/19/2021
66
ms.custom: devx-track-js
77
#intent: Create Express.js web app with easy auth configured.
88
---
@@ -28,6 +28,17 @@ Complete sample code provided:
2828
* Sample [basic app](https://github.com/Azure-Samples/js-e2e-static-web-app-with-cli/tree/1-basic-app-with-api) - on branch named `1-basic-app-with-api`
2929
* Sample [basic app with auth](https://github.com/Azure-Samples/js-e2e-static-web-app-with-cli/tree/2-basic-app-with-api-and-auth) - on branch named `2-basic-app-with-api-and-auth`
3030

31+
32+
## Authentication in this sample
33+
34+
The authentication in this sample provides:
35+
* React client provides:
36+
* Login/Logout
37+
* Public and private routes based on user's authentication status
38+
* Private route has access to API, `await fetch(`/api/hello?name=${name}`)`
39+
40+
This is an _easy auth_ implementation. The API can't act [_on behalf of_(OBO))[/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow] the logged in user. Acting on behalf of the user requires more configuration both in the Azure Active Directory app and the Azure Identity SDK in the API.
41+
3142
## Prepare your development environment
3243

3344
Install the following:

0 commit comments

Comments
 (0)