jeroenheijmans / sample-angular-oauth2-oidc-with-auth-guards

Basic example of how to integrate the angular-oauth2-oidc library in an Angular SPA utilizing AuthGuards.
MIT License
262 stars 112 forks source link

Steps for Azure AD #119

Closed blagerweij closed 1 year ago

blagerweij commented 2 years ago

Required changes for Azure AD: 1) add strictDiscoveryDocumentValidation: false, to auth-config.ts (Azure uses several domain names) 2) update issuer: issuer: 'https://login.microsoftonline.com/{tenant-id}/v2.0', 3) update clientId with the correct application id 4) remove api from scope 5) since redirect uri is set to redirectUri: window.location.origin + '/',, add a SPA redirect URI http://localhost:4200/ (without index.html)

After the above changes are made, works flawlessly. Thanks for the sample.

jeroenheijmans commented 1 year ago

Thanks for the addition! I'll link to your steps in the README. 😊❤️

jeroenheijmans commented 1 year ago

Added a link over here.