Socket
Socket
Sign inDemoInstall

passport-sharepoint-addin

Package Overview
Dependencies
89
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    passport-sharepoint-addin

Passport.js authentication middleware for SharePoint add-in


Version published
Weekly downloads
22
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Passport.js authentication middleware for SharePoint add-in

Passport.js authentication strategy for SharePoint Online and SharePoint on-premise performing authentication via ACS.

This module allows you to perform SharePoint add-in authentication for your Node.js Express web application. Can be also integrated into other connect-based frameworks.

Install

npm install passport-sharepoint-addin

Usage

For detailed in-depth tutorial and configuration workflow please visit sample here - Express SharePoint add-in sample.

Basic setup

passport.use(new SharePointAddinStrategy({clientId: '', clientSecret: ''}, 'https://site.com/auth/sharepoint/callback', (profile: ISharePointProfile) => {
        return User.findOne({ 'sharepoint.loginName': profile.loginName })
            .then(user => {
                if (user) {
                    return user;
                }

                const newUser = new User();
                newUser.sharepoint.email = profile.email;
                newUser.sharepoint.loginName = profile.loginName;
                newUser.sharepoint.displayName = profile.displayName;
                return newUser.save();
            });
    }));

Keywords

FAQs

Last updated on 22 Jun 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc