Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70759

Ionic 4: Authentication with MS ADAL

$
0
0

@anton_klochko wrote:

Hi all ! Could anyone suggest please, if exist way to implement authentication with MS ADAL in Ionic 4? If anyone has working example? I try to use such code, but after authentication it dose not redirect back to my App.

let authContext: AuthenticationContext = this.msAdal.createAuthenticationContext('https://login.windows.net/common');

    authContext.acquireTokenAsync('https://graph.windows.net', 'ClinetID', 'http://localhost:8000','','')
        .then((authResponse: AuthenticationResult) => {
          console.log('Token is' , authResponse.accessToken);
          console.log('Token will expire on', authResponse.expiresOn);
        })
        .catch((e: any) => console.log('Authentication failed', e));

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>