Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion samples/nodejs/copilotstudio-client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@
}
}
const pca = new msal.PublicClientApplication(msalConfig)
const scopes = CopilotStudioClient.scopeFromSettings(settings);

Check failure on line 39 in samples/nodejs/copilotstudio-client/src/index.ts

View workflow job for this annotation

GitHub Actions / build

Trailing spaces not allowed

Check failure on line 39 in samples/nodejs/copilotstudio-client/src/index.ts

View workflow job for this annotation

GitHub Actions / build

Extra semicolon
const tokenRequest = {
scopes: ['https://api.powerplatform.com/.default'],
scopes: [scopes],
redirectUri: 'http://localhost',
openBrowser: async (url: string) => {
await open(url)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/
import { PublicClientApplication, InteractionRequiredAuthError } from '@azure/msal-browser'
import { ConnectionSettings } from '@microsoft/agents-copilotstudio-client'
import { ConnectionSettings, CopilotStudioClient} from '@microsoft/agents-copilotstudio-client'

Check failure on line 6 in samples/nodejs/copilotstudio-webchat-react/src/acquireToken.ts

View workflow job for this annotation

GitHub Actions / build

A space is required before '}'

Check failure on line 6 in samples/nodejs/copilotstudio-webchat-react/src/acquireToken.ts

View workflow job for this annotation

GitHub Actions / build

Multiple spaces found before 'CopilotStudioClient'

export async function acquireToken (settings: ConnectionSettings) {
const msalInstance = new PublicClientApplication({
Expand All @@ -14,8 +14,9 @@
})

await msalInstance.initialize()
const scopes = CopilotStudioClient.scopeFromSettings(settings);

Check failure on line 17 in samples/nodejs/copilotstudio-webchat-react/src/acquireToken.ts

View workflow job for this annotation

GitHub Actions / build

Trailing spaces not allowed

Check failure on line 17 in samples/nodejs/copilotstudio-webchat-react/src/acquireToken.ts

View workflow job for this annotation

GitHub Actions / build

Extra semicolon
const loginRequest = {
scopes: ['https://api.powerplatform.com/.default'],
scopes: [scopes],
redirectUri: window.location.origin,
}
// When there are not accounts or the acquireTokenSilent fails,
Expand Down
7 changes: 6 additions & 1 deletion samples/nodejs/copilotstudio-webclient/web/acquireToken.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
* Licensed under the MIT License.
*/

import {
CopilotStudioClient,
} from '@microsoft/agents-copilotstudio-client'

export async function acquireToken (settings) {
const msalInstance = new window.msal.PublicClientApplication({
auth: {
Expand All @@ -12,8 +16,9 @@
})

await msalInstance.initialize()
const scopes = CopilotStudioClient.scopeFromSettings(settings);

Check failure on line 19 in samples/nodejs/copilotstudio-webclient/web/acquireToken.js

View workflow job for this annotation

GitHub Actions / build

Trailing spaces not allowed

Check failure on line 19 in samples/nodejs/copilotstudio-webclient/web/acquireToken.js

View workflow job for this annotation

GitHub Actions / build

Extra semicolon
const loginRequest = {
scopes: ['https://api.powerplatform.com/.default'],
scopes: [scopes],
redirectUri: window.location.origin,
}

Expand Down
Loading