0

Here im using angularjs with webApi when i login with my credentials its generating Token as

data:
access_token:"SKvWJ2-IK_Zohn6xLS6HXydoV1NdovM5wvtcTvJM0hkZ"
expires_in:86399
token_type:"bearer"

This Token is stored in

 LoginFac.LoginWithToken(obj).then(function (d) {
            sessionStorage.employee = angular.toJson(d);

I stored my authentication Details in sessionStorage.employee when i need my access_token And token_type how can i get it back

Md Ghousemohi
  • 197
  • 2
  • 13

1 Answers1

1

You can use sessionStorage.getItem and JSON.parse and then access the property access_token

Sajeetharan
  • 216,225
  • 63
  • 350
  • 396