You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/active-directory/develop/includes/desktop-app/quickstart-nodejs-electron.md
+4-7Lines changed: 4 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ To register your application and add the app's registration information to your
38
38
1. Select **Register** to create the application.
39
39
1. Under **Manage**, select **Authentication**.
40
40
1. Select **Add a platform** > **Mobile and desktop applications**.
41
-
1. In the **Redirect URIs** section, enter the redirect URI suggested by the app registration portal, e.g. `msalfa29b4c9-7675-4b61-8a0a-bf7b2b4fda91://auth`.
41
+
1. In the **Redirect URIs** section, enter `http://localhost`.
42
42
1. Select **Configure**.
43
43
44
44
#### Step 2: Download the Electron sample project
@@ -62,7 +62,7 @@ Your file should look similar to below:
62
62
63
63
```javascript
64
64
constAAD_ENDPOINT_HOST="https://login.microsoftonline.com/"; // include the trailing slash
@@ -121,7 +118,7 @@ Your file should look similar to below:
121
118
122
119
### How the sample works
123
120
124
-
When a user selects the **Sign In** button for the first time, get `getTokenInteractive` method of *AuthProvider.js* is called. This method redirects the user to sign-in with the *Microsoft identity platform endpoint* and validate the user's credentials, and then obtains an **authorization code**. This code is then exchanged for an access token using the `acquireTokenByCode` method of MSAL Node.
121
+
When a user selects the **Sign In** button for the first time, `acquireTokenInteractive` method of MSAL Node is called. This method redirects the user to sign-in with the *Microsoft identity platform endpoint*, obtains an **authorization code**, and then exchanges it for an access token.
Copy file name to clipboardExpand all lines: articles/active-directory/develop/tutorial-v2-nodejs-desktop.md
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -129,7 +129,6 @@ Fill in these details with the values you obtain from Azure app registration por
129
129
- `Enter_the_Cloud_Instance_Id_Here`: The Azure cloud instance in which your application is registered.
130
130
- For the main (or *global*) Azure cloud, enter `https://login.microsoftonline.com/`.
131
131
- For **national** clouds (for example, China), you can find appropriate values in [National clouds](authentication-national-cloud.md).
132
-
- `Enter_the_Redirect_Uri_Here`: The Redirect Uri of the application you registered `http://localhost`.
133
132
- `Enter_the_Graph_Endpoint_Here` is the instance of the Microsoft Graph API the application should communicate with.
134
133
- For the **global** Microsoft Graph API endpoint, replace both instances of this string with `https://graph.microsoft.com/`.
135
134
- For endpoints in **national** cloud deployments, see [National cloud deployments](/graph/deployments) in the Microsoft Graph documentation.
@@ -158,13 +157,13 @@ If you consent to the requested permissions, the web applications displays your
158
157
159
158
## Test web API call
160
159
161
-
After you sign in, select **See Profile** to view the user profile information returned in the response from the call to the Microsoft Graph API. After consent, you'll view the messages returned in the response from the call to the Microsoft Graph API:
160
+
After you sign in, select **See Profile** to view the user profile information returned in the response from the call to the Microsoft Graph API. After consent, you'll view the profile information returned in the response:
162
161
163
162
:::image type="content" source="media/tutorial-v2-nodejs-desktop/desktop-04-profile.png" alt-text="profile information from Microsoft Graph":::
164
163
165
164
## How the application works
166
165
167
-
When a user selects the **Sign In** button for the first time, get `getTokenInteractive` method of *AuthProvider.js* is called. This method redirects the user to sign-in with the Microsoft identity platform endpoint and validates the user's credentials, obtains an **authorization code** and then exchanges that code for an ID token, access token, and refresh token. MSAL Node also caches these tokens for future use.
166
+
When a user selects the **Sign In** button for the first time, the `acquireTokenInteractive` method of MSAL Node. This method redirects the user to sign-in with the Microsoft identity platform endpoint and validates the user's credentials, obtains an **authorization code** and then exchanges that code for an ID token, access token, and refresh token. MSAL Node also caches these tokens for future use.
168
167
169
168
The ID token contains basic information about the user, like their display name. The access token has a limited lifetime and expires after 24 hours. If you plan to use these tokens for accessing protected resource, your back-end server *must* validate it to guarantee the token was issued to a valid user for your application.
0 commit comments