kryll13/sso

Office365 SSO

Maintainers

Details

github.com/Kryll13/sso

Source

Issues

Installs: 13

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/kryll13/sso

v1.0.0 2019-07-28 12:09 UTC

This package is auto-updated.

Last update: 2025-09-29 02:21:21 UTC


README

Thanks to stevenmaguire/oauth2-microsoft library.

Install with Composer :

composer require kryll13/sso

Before using it

You must have :

  • an Office 365 subscription,
  • created an App in Azure Active Directory,
  • set the URL app,
  • set the redirect URL to process the token,
  • the client's app ID,
  • and the client's app secret.

Setup

Add those entries in the .env file and replace examples with your data.

APP_URL="https://app.example.com"
TENANT_ID="........-....-....-....-............"
APP_ID="........-....-....-....-............"
APP_SECRET="app_secret"
REDIRECT_URI="https://app.example.com"
AUTHORITY_URL="https://login.microsoftonline.com"
AUTHORITY_ENDPOINT_PATH="/oauth2/v2.0/authorize"
AUTHORITY_TOKEN_PATH="/oauth2/v2.0/token"
SCOPES="openid profile offline_access user.read"
AUTHORITY_LOGOUT_PATH="/oauth2/v2.0/logout?post_logout_redirect_uri="

Usage

Instantiate Office365 class and call methods.

  • login
  • logout
  • getUser