WebApp-OpenIDConnect-NodeJS | newer version of this sample taking advantage | Runtime Evironment library
kandi X-RAY | WebApp-OpenIDConnect-NodeJS Summary
kandi X-RAY | WebApp-OpenIDConnect-NodeJS Summary
This sample demonstrates how to set up OpenId Connect authentication in a web application built using Node.js with Express. The sample is designed to run on any platform.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of WebApp-OpenIDConnect-NodeJS
WebApp-OpenIDConnect-NodeJS Key Features
WebApp-OpenIDConnect-NodeJS Examples and Code Snippets
Community Discussions
Trending Discussions on WebApp-OpenIDConnect-NodeJS
QUESTION
(All IDs in the below example are made up. I've added them to illustrate the format for some of the parameters).
My tenant is at acme.co.uk, but I want the web app that I've got deployed at https://subdomain.acme2.co.uk to delegate authentication of users to Azure AD.
I registered my app as below using the new portal: (The field names are those used on the azure portal).
App ID URL: https://acme.co.uk/11111111-2222-3333-4444-555555555555
Home page URL: https://subdomain.acme2.co.uk/api/auth/aad
Reply URLs: https://subdomain.acme2.co.uk/api/auth/aad/callback
and created a secret key that doesn't expire with the value: '111111111111111111/aaaaaaaaaaaaaaaaaaaaaaaa='
I've been following the passport-azure-ad github sample using v1 endpoint as a guide.
...ANSWER
Answered 2017-Oct-26 at 13:54Ok found it... clientID: 'https://acme.co.uk/11111111-2222-3333-4444-555555555555' was the culprit.
That should be the app Id NOT the app Id URI. Doh. Many thanks to @Alex Blex for the guidance. This was most helpful.
QUESTION
I'm trying to set up Azure AD v2 from http://aka.ms/aaddevv2 using https://github.com/AzureADQuickStarts/AppModelv2-WebApp-OpenIDConnect-nodejs (master branch @ b752987b7367fc92692ac538e1fc24cb400d0fbc), however I can't seem to log in with accounts created outside of the user who created the the app at https://apps.dev.microsoft.com/?deeplink=/appList.
On the apps.dev.microsoft.com end, I have:
- the Application ID, and have created a password which I've used in the
clientID
andclientSecret
respecitively in the config.js file. - Added
http://localhost:3000/auth/openid/return
underRedirect URLs
- Have
User.Read
for theDelegated Permissions
section
Is there anything else I need to set up? Am I missing something in the code?
The error I get when logging in with accounts outside of the setup account is:
...Sign in Sorry, but we’re having trouble signing you in.
AADSTS50020: User account '[email]' from identity provider 'live.com' does not exist in tenant 'Default Directory' and cannot access the application '[clientID]' in that tenant. The account needs to be added as an external user in the tenant first. Sign out and sign in again with a different Azure Active Directory user account.
ANSWER
Answered 2018-Mar-20 at 12:13You need to set the identity metadata URL so that it allows personal accounts.
For example:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install WebApp-OpenIDConnect-NodeJS
$ git clone git@github.com:AzureADQuickStarts/WebApp-OpenIDConnect-NodeJS.git
$ git clone https://github.com/AzureADQuickStarts/WebApp-OpenIDConnect-NodeJS.git
$ npm install
Start mongoDB service. If you are using mongoDB session store in this app, you have to install mongoDB and start the service first. If you are using the default session store, you can skip this step. Run the app using the following command from your command line.
Start mongoDB service. If you are using mongoDB session store in this app, you have to install mongoDB and start the service first. If you are using the default session store, you can skip this step.
Run the app using the following command from your command line. $ node app.js
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page