nraboy / ng-cordova-oauth

AngularJS oauth library for use with Apache Cordova projects
https://www.thepolyglotdeveloper.com
MIT License
456 stars 199 forks source link

Getting id_token from Microsoft OAuth2.0 using oauthWindowslive #338

Open seatechdev opened 6 years ago

seatechdev commented 6 years ago

Hi I am using a modified version of oauthWindowslive. I am trying to get id_token form the Microsoft OAuth2.0. Since I am using the service to get some outlook calendar data I am using the following: var browserRef = window.cordova.InAppBrowser.open('https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=' + clientId + "&scope=openid+profile+User.Read" + '&response_type=token&response_mode=fragment' + '&display=touch' + '&redirect_uri=' + redirect_uri, '_blank', 'location=no,clearsessioncache=yes,clearcache=yes');

But if I insert id_token+token for the response_type I cannot authenticate. I cannot authenticate even if I try using id_token even if I try using it by itself.