auth0 / auth0-sharepoint

Auth0 SharePoint support
https://auth0.com/docs/integrations/sharepoint
MIT License
9 stars 6 forks source link

Auth0 SharePoint

This repository shows different ways of interacting with a SharePoint environment that has been configured with Auth0.

Customizing the Login Page

The Authentication Provider uses Universal Login to authenticate users. You can learn how to customize it by reading this document.

Updating from Previous Versions

Previous versions of the Authentication Provider used Lock v9 embedded in the Sharepoint Login page. Lock v9 is not longer supported.

To upgrade to the Universal Login page, you will need to manually update the existing login pages in your Sharepoint installation. Those can be found in the \Common Files\microsoft shared\Web Server Extensions\\TEMPLATE\IDENTITYMODEL\LOGIN, and are identified by the Sharepoint Client ID + ".aspx".

You will need to replace the contents of that file with the content in the login.aspx file, replacing the YOUR_AUTH0_DOMAIN and YOUR_CLIENT_ID strings with the values that can be found in the "Tutorial" tab of the Sharepoint SSO Integration in the Auth0 Dashboard.

    string domain = "YOUR_AUTH0_DOMAIN";
    string clientId = "YOUR_CLIENT_ID";

If you need to provide a way for users to log-in directly to Sharepoint using Windows Authentication, you will need to customize the login page to include a link to the Sharepoint Login page, usually http:///_windows/default.aspx?ReturnUrl=/_layouts/15/Authenticate.aspx. You can do it with the following code:

lock.on('signin ready', function() {
  $('.auth0-lock-tabs-container').
      after('<div><p class="auth0-lock-alternative" style="padding:5px 0;">' +
            '<a class="auth0-lock-alternative-link" href="http://<Sharepoint Site>/_windows/default.aspx?ReturnUrl=/_layouts/15/Authenticate.aspx">' +
            'Login with Windows Authentication'+
            '</a>'+
            '</p><p><span>or</span></p></div>');
});

What is Auth0?

Auth0 helps you to:

Create a free Auth0 Account

  1. Go to Auth0 and click Sign Up.
  2. Use Google, GitHub or Microsoft Account to login.

Issue Reporting

If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.

Author

Auth0

License

This project is licensed under the MIT license. See the LICENSE file for more info.