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/tutorial-v2-nodejs-desktop.md
+1-15Lines changed: 1 addition & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,17 +78,9 @@ The renderer methods are exposed by the preload script found in the *preload.js*
78
78
79
79
This preload script exposes a renderer methods to give the renderer process controlled access to some `Node APIs` by applying IPC channels that have been configured for communication between the main and renderer processes.
80
80
81
-
6. Next, create *UIManager.js* class inside the *App* folder and add the following code:
*CustomProtocolListener* class can be instantiated in order to register and unregister a custom typed protocol on which MSAL Node can listen for Auth Code responses.
90
82
91
-
8. Finally, create a file named *constants.js* that will store the strings constants for describing the application **events**:
83
+
6. Finally, create a file named *constants.js* that will store the strings constants for describing the application **events**:
@@ -118,12 +110,6 @@ In *App* folder, create a file named *AuthProvider.js*. The *AuthProvider.js* fi
118
110
119
111
In the code snippet above, we first initialized MSAL Node `PublicClientApplication` by passing a configuration object (`msalConfig`). We then exposed `login`, `logout` and `getToken` methods to be called by main module (*main.js*). In `login` and `getToken`, we acquire ID and access tokens, respectively, by first requesting an authorization code and then exchanging this with a token using MSAL Node `acquireTokenByCode` public API.
120
112
121
-
## Add a method to call a web API
122
-
123
-
Create another file named *fetch.js*. This file will contain an Axios HTTP client for making REST calls to the Microsoft Graph API.
Finally, create an environment file to store the app registration details that will be used when acquiring tokens. To do so, create a file named *authConfig.js* inside the root folder of the sample (*ElectronDesktopApp*), and add the following code:
0 commit comments