Files
semantic-kernel/samples/apps/auth-api-webapp-react
dependabot[bot] 7382bdba1d Bump semver from 6.3.0 to 6.3.1 in /samples/apps/auth-api-webapp-react (#1944)
[//]: # (dependabot-start)
⚠️  **Dependabot is rebasing this PR** ⚠️ 

Rebasing might not happen immediately, so don't worry if this takes some
time.

Note: if you make any changes to this PR yourself, they will take
precedence over the rebase.

---

[//]: # (dependabot-end)

Bumps [semver](https://github.com/npm/node-semver) from 6.3.0 to 6.3.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/npm/node-semver/releases">semver's
releases</a>.</em></p>
<blockquote>
<h2>v6.3.1</h2>
<h2><a
href="https://github.com/npm/node-semver/compare/v6.3.0...v6.3.1">6.3.1</a>
(2023-07-10)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><a
href="https://github.com/npm/node-semver/commit/928e56d21150da0413a3333a3148b20e741a920c"><code>928e56d</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/591">#591</a>
better handling of whitespace (<a
href="https://redirect.github.com/npm/node-semver/issues/591">#591</a>)
(<a href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>,
<a href="https://github.com/joaomoreno"><code>@​joaomoreno</code></a>,
<a
href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/npm/node-semver/blob/v6.3.1/CHANGELOG.md">semver's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/npm/node-semver/compare/v6.3.0...v6.3.1">6.3.1</a>
(2023-07-10)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><a
href="https://github.com/npm/node-semver/commit/928e56d21150da0413a3333a3148b20e741a920c"><code>928e56d</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/591">#591</a>
better handling of whitespace (<a
href="https://redirect.github.com/npm/node-semver/issues/591">#591</a>)
(<a href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>,
<a href="https://github.com/joaomoreno"><code>@​joaomoreno</code></a>,
<a
href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
<h2>6.2.0</h2>
<ul>
<li>Coerce numbers to strings when passed to semver.coerce()</li>
<li>Add <code>rtl</code> option to coerce from right to left</li>
</ul>
<h2>6.1.3</h2>
<ul>
<li>Handle X-ranges properly in includePrerelease mode</li>
</ul>
<h2>6.1.2</h2>
<ul>
<li>Do not throw when testing invalid version strings</li>
</ul>
<h2>6.1.1</h2>
<ul>
<li>Add options support for semver.coerce()</li>
<li>Handle undefined version passed to Range.test</li>
</ul>
<h2>6.1.0</h2>
<ul>
<li>Add semver.compareBuild function</li>
<li>Support <code>*</code> in semver.intersects</li>
</ul>
<h2>6.0</h2>
<ul>
<li>
<p>Fix <code>intersects</code> logic.</p>
<p>This is technically a bug fix, but since it is also a change to
behavior
that may require users updating their code, it is marked as a major
version increment.</p>
</li>
</ul>
<h2>5.7</h2>
<ul>
<li>Add <code>minVersion</code> method</li>
</ul>
<h2>5.6</h2>
<ul>
<li>Move boolean <code>loose</code> param to an options object, with
backwards-compatibility protection.</li>
<li>Add ability to opt out of special prerelease version handling with
the <code>includePrerelease</code> option flag.</li>
</ul>
<h2>5.5</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/npm/node-semver/commit/44d27bc007e4827e9b797d6145f1076c127005f2"><code>44d27bc</code></a>
chore: release 6.3.1</li>
<li><a
href="https://github.com/npm/node-semver/commit/928e56d21150da0413a3333a3148b20e741a920c"><code>928e56d</code></a>
fix: better handling of whitespace (<a
href="https://redirect.github.com/npm/node-semver/issues/591">#591</a>)</li>
<li><a
href="https://github.com/npm/node-semver/commit/39f632690ea5b1b0d64fa913aa0f96f42b9bde32"><code>39f6326</code></a>
chore: <code>@​npmcli/template-oss</code><a
href="https://github.com/4"><code>@​4</code></a>.16.0</li>
<li>See full diff in <a
href="https://github.com/npm/node-semver/compare/v6.3.0...v6.3.1">compare
view</a></li>
</ul>
</details>
<details>
<summary>Maintainer changes</summary>
<p>This version was pushed to npm by <a
href="https://www.npmjs.com/~lukekarrys">lukekarrys</a>, a new releaser
for semver since your current version.</p>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=semver&package-manager=npm_and_yarn&previous-version=6.3.0&new-version=6.3.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/microsoft/semantic-kernel/network/alerts).

</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-11 05:22:29 +00:00
..
2023-06-23 17:28:24 +00:00

Authenticated API’s Sample Learning App

Important

This learning sample is for educational purposes only and should not be used in any production use case. It is intended to highlight concepts of Semantic Kernel and not any architectural / security design practices to be used.

Watch the Authenticated API’s Sample Quick Start Video

Running the sample

  1. You will need an Open AI Key or Azure Open AI Service key for this sample
  2. Ensure the KernelHttpServer sample is already running at http://localhost:7071. If not, follow the steps to start it here.
  3. You will also need to register your application in the Azure Portal. Follow the steps to register your app here.
    • Select Single-page application (SPA) as platform type, and the Redirect URI will be http://localhost:3000
    • Select Personal Microsoft accounts only as supported account types for this sample
  4. Copy .env.example into a new file with name ".env".

    Note

    : Samples are configured to use chat completion AI models (e.g., gpt-3.5-turbo, gpt-4, etc.). See https://platform.openai.com/docs/models/model-endpoint-compatibility for chat completion model options.

  5. Once registered, copy the Application (client) ID from the Azure Portal and paste the GUID into the .env file next to REACT_APP_GRAPH_CLIENT_ID= (first line of the .env file).
  6. Run the following command yarn install (if you have never run the sample before) and/or yarn start from the command line.
  7. A browser will automatically open, otherwise you can navigate to http://localhost:3000 to use the sample.

Working with Secrets: KernelHttpServer's Readme has a note on safely working with keys and other secrets.

About the Authenticated API’s Sample

The Authenticated API’s sample allows you to use authentication to connect to the Microsoft Graph using your personal account.

If you don’t have a Microsoft account or do not want to connect to it, you can review the code to see the patterns needed to call out to APIs.

The sample highlights connecting to Microsoft Graph and calling APIs for Outlook, OneDrive, and ToDo. Each function will call Microsoft Graph and/or Open AI to perform the tasks.

Caution

Each function will call Open AI which will use tokens that you will be billed for.

Troubleshooting

unauthorized_client: The client does not exist or is not enabled for consumers.

  1. Ensure in your Application Manifest that Personal Microsoft accounts are allowed to sign in.

    • "signInAudience": "PersonalMicrosoftAccount" or
    • "signInAudience": "AzureADandPersonalMicrosoftAccount"
  2. If you are not able to change the manifest, create a new Application following the instructions in Running the sample, step 3.