I am using Angular Satellizer v0.15.x with bower in my Angular v1.6.4 app.
My exact workflow is as follows:
- User opens a page.
- The user clicks on a button.
- Google sign in popup opens using satallizer's
$authenticate('google')
method. - User signs in.
- Satellizer receives google's auth code and sends it to my API
- API fetches user's auth and refresh tokens based on auth code, and stores it in DB. Responds to the Angular UI.
- AngularJS calls another method to save user's details.
I am using JWT token to make API calls as my API is stateless. I store this token in my local storage with the key app.auth.token
. As soon as the 6th step completes of my workflow, my JWT token is removed from local storage (and the 7th step fails).
I suspected naming clashes, and tried to name my JWT token to something else, but no luck. I even analyzed all of my code, and I am not removing the token anywhere from my code.
For now, I've kept two copies of the JWT in local storage and I copy the token from the backup as soon as it is removed.
Anyone out there, who can guide me on solving this issue?
Edit 1:
Here are all the bower packages which I'm using:
"dependencies": {
"angular-animate": "^1.6.4",
"angular-sanitize": "^1.6.4",
"angular-messages": "^1.6.4",
"angular-ui-router": "^0.4.2",
"angular-strap": "^2.3.x",
"moment": "^2.18.x",
"animate.css": "^3.5.x",
"angular": "^1.6.4",
"ng-lodash": "^0.5.x",
"ng-focus-if": "^1.0.x",
"ngclipboard": "^1.1.x",
"angular-toastr": "^1.7.x",
"bootstrap-sass": "^3.3.x",
"angular-motion": "^0.4.x",
"angular-drag-and-drop-lists": "^1.4.x",
"angular-local-storage": "^0.5.x",
"angular-md5": "^0.1.x",
"angular-translate": "^2.15.x",
"moment-timezone": "^0.5.x",
"ment.io": "personal github URL",
"ng-material-floating-button": "personal github URL",
"angular-base64": "^2.0.x",
"satellizer": "^0.15.x",
"ng-jsoneditor": "personal github URL",
"highlightjs": "^9.10.x",
"angular-highlightjs": "^0.7.x",
"codemirror": "^5.25.x",
"angular-ui-codemirror": "^0.3.x",
"angular-carousel": "personal github URL",
"angular-cron-jobs": "^3.2.x",
"angular-read-more": "^1.0.x",
"angular-moment": "^1.0.1"
}