When I login using Google auth, I get the following exception :
Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.
at b64_to_utf8 (webpack:///./~/meanio-users/public/services/meanUser.js?:19:47)
at MeanUserKlass.onIdentity (webpack:///./~/meanio-users/public/services/meanUser.js?:76:33)
at eval (webpack:///./~/meanio-users/public/services/meanUser.js?:54:37)
at processQueue (webpack:///./~/angular/angular.js?:16843:37)
at eval (webpack:///./~/angular/angular.js?:16887:27)
at Scope.$digest (webpack:///./~/angular/angular.js?:17982:15)
at Scope.$apply (webpack:///./~/angular/angular.js?:18280:24)
at done (webpack:///./~/angular/angular.js?:12378:47)
at completeRequest (webpack:///./~/angular/angular.js?:12604:7)
at XMLHttpRequest.requestLoaded (webpack:///./~/angular/angular.js?:12532:9)
If I replace
decodeURIComponent(escape(window.atob( str )))
by
(new Buffer(str, 'base64')).toString('utf8')
it fixes the issue.
Thank you !
When I login using Google auth, I get the following exception :
If I replace
decodeURIComponent(escape(window.atob( str )))by
(new Buffer(str, 'base64')).toString('utf8')it fixes the issue.
Thank you !