Base solution for your next web application

Activities of "qbd"

We found the solution for single page application (AngularJS), any way we deicded to implement on server side for security reason.

Thanks all for response.

We are not able to find the solution for cross origin issue. If any one knows please let us know.

Thanks in advance!

I updated below code in appsettings.json file,

"App": { "ServerRootAddress": "http://localhost:22742/", "ClientRootAddress": "http://localhost:4200/", "CorsOrigins": "http://localhost:4200,http://localhost:49152,https://login.microsoftonline.com" },

I created Office365Login.component.js file and implemented below code

let options_: any = { client_id: client_id, client_secret: client_secret, redirect_uri: redirect_uri, code: authorization_code, grant_type: authorization_code,

headers: new HttpHeaders({
            "Access-Control-Allow-Origin": "*",
            "Access-Control-Allow-Methods": " POST, OPTIONS",
            "Access-Control-Allow-Headers": "Origin, Content-Type, X-Auth-Token",
            "Content-Type": "application/x-www-form-urlencoded",
    })

}; //Here we are calling the office365 token api. this.http.request("post", "https://login.microsoftonline.com/{tenantid}/oauth2/token", options).subscribe(result => { console.log(result); });

Showing 1 to 3 of 3 entries