angular5-adal-example
angular5-adal-example copied to clipboard
ADAL - Angular 5 Authethentication: Works fine on Localhost but API Unauthorized on upstream env.
I am implementing authentication for my Angular /Web APi/SQL Application. I have referred the below example for the same -https://docs.microsoft.com/en-us/windows-server/identity/ad-fs/development/single-page-application-with-ad-fs
The authentication works fine on my localhost but when i try to deploy it on upstream env., it doesnt authorize my Web API. I have registred the Client ID and reply URls for my upstream env. seperately but still no luck.
Sharing the configurations at both Angular and API end -
Angular - localhost - export const environment = { production: false, api_base: "http://localhost:54316/", adfsConfig: { instance: 'https://wbstst.abc.org/', tenant: 'adfs', clientId: '6cb9f1fa-d619-4bd2-a52a-bc2567359fa4' } };
Angular Test Env. export const environment = { production: true, api_base: "https://radwebsit.abc.org/secca/bip/", adfsConfig: { instance: 'https://wbstst.abc.org/', tenant: 'adfs', clientId: '50867c56-d081-4323-ad44-35d68720b009' }};
Web API - Web.Config :