Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Introduction

Define application keys for Passport.js integration. Currently supporting Github, Twitter, Facebook, and Google.

Full Example

...

Passport Azure authentication strategy using OAuth 2.0

Configuration sample object

Below is a configuration sample that is needed for the Facebook strategy to be configured. Follow the steps below the sample to get those configurations.

Code Block
languagejs
title

...

Configuration Sample
linenumberstrue
collapsetrue
"

...

facebook": {

...

    clientID: '%client_ID%',
    clientSecret: '%client_secret%',
    callbackURL: '%client_callback%',

	//optional
	useCommonEndpoint: 'https://login.microsoftonline.com/jh6trd45-uh87-ki87-hgt6-jhyf65esdfty',
	tenant: "%tenant_name%.onmicrosoft.com",
	resource: "00000002-0000-0000-c000-000000000000"
}


Configuration Steps

1 - Create an Azure application in Azure Active Directory

You must register an app with Azure in Azure Portal under Azure AD → App registration.

Image Added

Image Added

Once created, go to Certificates & Secrets to create a client secret.

Image Added

Image Added


Note: Make sure to copy the created client secret because you'll not be able to reveal it again.