Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception on login #10

Open
Elday12 opened this issue May 3, 2017 · 0 comments
Open

Exception on login #10

Elday12 opened this issue May 3, 2017 · 0 comments

Comments

@Elday12
Copy link

Elday12 commented May 3, 2017

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 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant