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: packages/mgt/README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,8 +30,10 @@ The components are also available as [React components](https://docs.microsoft.c
30
30
[Providers](https://docs.microsoft.com/graph/toolkit/providers) enable authentication and provide the implementation for acquiring access tokens on various platforms and expose a Microsoft Graph Client for calling the Microsoft Graph APIs. The components work best when used with a provider, but the providers can be used on their own.
The [Microsoft Graph Toolkit (mgt)](https://aka.ms/mgt) library is a collection of authentication providers and UI components powered by Microsoft Graph.
5
+
⚠️⚠️⚠️ This package is no longer receiving new features and will only receive critical bug and security fixes. All new applications should use [`@microsoft/mgt-msal2-provider`](https://docs.microsoft.com/graph/toolkit/providers/msal2) instead. ⚠️⚠️⚠️
6
+
7
+
The `@microsoft/mgt-msal-provider` package exposes the `MsalProvider` class which uses MSAL.js to sign in users and acquire tokens to use with Microsoft Graph via the Implicit Grant Flow.
6
8
7
-
The `@microsoft/mgt-msal-provider` package exposes the `MsalProvider` class which uses MSAL.js to sign in users and acquire tokens to use with Microsoft Graph.
9
+
For authentication based on the more secure OAuth 2.0 Authorization Code Flow with PKCE, please use the [`@microsoft/mgt-msal2-provider`](https://docs.microsoft.com/graph/toolkit/providers/msal2) instead.
8
10
9
11
[See docs for full documentation of the MsalProvider](https://docs.microsoft.com/graph/toolkit/providers/msal)
10
12
13
+
The [Microsoft Graph Toolkit (mgt)](https://aka.ms/mgt) library is a collection of authentication providers and UI components powered by Microsoft Graph.
The [Microsoft GraphToolkit (mgt)](https://aka.ms/mgt) library is a collection of authentication providers and UI components powered by Microsoft Graph.
5
+
The `@microsoft/mgt-teams-msal2-provider` package exposes the `TeamsMsal2Provider` class to be used inside your Microsoft Teams tab applications to authenticate users, to call Microsoft Graph, and to power the Microsoft Graph Toolkit components. The provider is built on top of [msal-browser](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-browser) and supports both the interactive sign in flow on the client and Single Sign-On (SSO) flow via your own backend. SSO mode is enabled by setting `ssoUrl` \ `sso-url` and requires a backend service to handle the on-behalf-of flow.
6
6
7
-
The `@microsoft/mgt-teams-sso-provider` package exposes the `TeamsSSOProvider` class to be used inside your Microsoft Teams tab applications to authenticate users, to call Microsoft Graph, and to power the mgt components.
7
+
[See the full documentation of the TeamsMsal2Provider](https://docs.microsoft.com/graph/toolkit/providers/teams-msal2)
8
8
9
-
[See docs for full documentation of the TeamsSSOProvider](https://docs.microsoft.com/graph/toolkit/providers/teamssso)
9
+
The [Microsoft Graph Toolkit (mgt)](https://aka.ms/mgt) library is a collection of authentication providers and UI components powered by Microsoft Graph.
10
10
11
11
## Usage
12
12
13
-
The TeamsSSOProvider requires the usage of the Microsoft Teams SDK which is not automatically installed.
13
+
The TeamsMsal2Provider requires the usage of the Microsoft Teams SDK which is not automatically installed.
1. Before initializing the provider, create a new page in your application (ex: https://mydomain.com/auth) that will handle the auth redirect. Call the `handleAuth`functionto handle all client side auth or permission consent.
22
22
23
23
```ts
24
24
import * as MicrosoftTeams from "@microsoft/teams-js/dist/MicrosoftTeams";
25
-
import {TeamsSSOProvider} from '@microsoft/mgt-teams-sso-provider';
25
+
import {TeamsMsal2Provider} from '@microsoft/mgt-teams-msal2-provider';
3. Initialize the provider in your main code (not on your auth page). The provider can be used in"client side auth" mode or SSO mode. SSO mode is enabled by setting `ssoUrl`\ `sso-url` and requires a backend service to handle the on-behalf-of flow.
32
32
33
33
```ts
34
34
import {Providers} from '@microsoft/mgt-element';
35
-
import {TeamsSSOProvider} from '@microsoft/mgt-teams-sso-provider';
35
+
import {TeamsMsal2Provider} from '@microsoft/mgt-teams-msal2-provider';
36
36
import * as MicrosoftTeams from "@microsoft/teams-js/dist/MicrosoftTeams";
Copy file name to clipboardExpand all lines: packages/providers/mgt-teams-msal2-provider/package.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
{
2
-
"name": "@microsoft/mgt-teams-sso-provider",
2
+
"name": "@microsoft/mgt-teams-msal2-provider",
3
3
"version": "2.0.0",
4
-
"description": "The Microsoft Graph Toolkit Teams Single Sign-On Provider",
4
+
"description": "The Microsoft Graph Toolkit Teams Msal2 Provider based on Msal2 for interactive authentication on the client. The provider also supports Single Sign-On(SSO) via a dev provided backend",
0 commit comments