Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@microsoft/mgt-mock-provider

Package Overview
Dependencies
Maintainers
2
Versions
374
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/mgt-mock-provider

The Microsoft Graph Toolkit Mock Provider

  • 3.0.0-next.wc-registration-utils.050527a
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.3K
decreased by-2.1%
Maintainers
2
Weekly downloads
 
Created
Source

Microsoft Graph Toolkit Proxy Provider

npm

The Microsoft Graph Toolkit (mgt) library is a collection of authentication providers and UI components powered by Microsoft Graph.

The @microsoft/mgt-proxy-provider package exposes the ProxyProvider class which allows a developer to proxy all calls to Microsoft Graph to their own backend. This allows all mgt-components to function properly when the authentication and calls to Microsoft Graph must be done in the backend.

See docs for full documentation of the ProxyProvider

Usage

  1. Install the packages

    npm install @microsoft/mgt-element @microsoft/mgt-proxy-provider
    
  2. Initialize the provider in code

    import {Providers} from '@microsoft/mgt-element';
    import {ProxyProvider} from '@microsoft/mgt-proxy-provider';
    
    // initialize the auth provider globally
    Providers.globalProvider = new ProxyProvider("https://myurl.com/api/GraphProxy");
    
  3. Alternatively, initialize the provider in html (only client-id is required):

    <script type="module" src="../node_modules/@microsoft/mgt-proxy-provider/dist/es6/index.js" />
    
    <mgt-proxy-provider graph-proxy-url="https://myurl.com/api/GraphProxy"></mgt-proxy-provider>
    

See provider usage documentation to learn about how to use the providers with the mgt components, to sign in/sign out, get access tokens, call Microsoft Graph, and more.

Sea also

Keywords

FAQs

Package last updated on 30 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc