{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angularfire2/issues/1710","repository_url":"https://api.github.com/repos/angular/angularfire2","labels_url":"https://api.github.com/repos/angular/angularfire2/issues/1710/labels{/name}","comments_url":"https://api.github.com/repos/angular/angularfire2/issues/1710/comments","events_url":"https://api.github.com/repos/angular/angularfire2/issues/1710/events","html_url":"https://github.com/angular/angularfire2/issues/1710","id":329018432,"node_id":"MDU6SXNzdWUzMjkwMTg0MzI=","number":1710,"title":"cant signInWithCustomToken using .getToken as parameter","user":{"login":"GideonWislang","id":5721763,"node_id":"MDQ6VXNlcjU3MjE3NjM=","avatar_url":"https://avatars3.githubusercontent.com/u/5721763?v=4","gravatar_id":"","url":"https://api.github.com/users/GideonWislang","html_url":"https://github.com/GideonWislang","followers_url":"https://api.github.com/users/GideonWislang/followers","following_url":"https://api.github.com/users/GideonWislang/following{/other_user}","gists_url":"https://api.github.com/users/GideonWislang/gists{/gist_id}","starred_url":"https://api.github.com/users/GideonWislang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GideonWislang/subscriptions","organizations_url":"https://api.github.com/users/GideonWislang/orgs","repos_url":"https://api.github.com/users/GideonWislang/repos","events_url":"https://api.github.com/users/GideonWislang/events{/privacy}","received_events_url":"https://api.github.com/users/GideonWislang/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-04T11:37:17Z","updated_at":"2018-06-07T03:36:04Z","closed_at":"2018-06-06T20:41:31Z","author_association":"NONE","body":"Trying to sort out a persistent login where I save the token using getToken in storage and then log back in with it when the page loads, using signInWithCustomToken (mobile app).\r\n\r\nError:\r\n`ERROR Error: Uncaught (in promise): Error: signInWithCustomToken failed: First argument \"token\" must be a valid string.`\r\n\r\nPart of code ('current_session' set to .getToken() when signInWithEmailAndPassword)\r\n`\r\n\r\n    try {\r\n      this.storage.get('current_session').then((token) => {\r\n        const result = this.afAuth.auth.signInWithCustomToken(token).then(function(result){\r\n          var usertoken = result.getToken();\r\n          this.storage.set('current_session', usertoken);\r\n          console.log(\"onload:\"+usertoken)\r\n        })\r\n      });\r\n`"},"comment":{"url":"https://api.github.com/repos/angular/angularfire2/issues/comments/395282123","html_url":"https://github.com/angular/angularfire2/issues/1710#issuecomment-395282123","issue_url":"https://api.github.com/repos/angular/angularfire2/issues/1710","id":395282123,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTI4MjEyMw==","user":{"login":"GideonWislang","id":5721763,"node_id":"MDQ6VXNlcjU3MjE3NjM=","avatar_url":"https://avatars3.githubusercontent.com/u/5721763?v=4","gravatar_id":"","url":"https://api.github.com/users/GideonWislang","html_url":"https://github.com/GideonWislang","followers_url":"https://api.github.com/users/GideonWislang/followers","following_url":"https://api.github.com/users/GideonWislang/following{/other_user}","gists_url":"https://api.github.com/users/GideonWislang/gists{/gist_id}","starred_url":"https://api.github.com/users/GideonWislang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GideonWislang/subscriptions","organizations_url":"https://api.github.com/users/GideonWislang/orgs","repos_url":"https://api.github.com/users/GideonWislang/repos","events_url":"https://api.github.com/users/GideonWislang/events{/privacy}","received_events_url":"https://api.github.com/users/GideonWislang/received_events","type":"User","site_admin":false},"created_at":"2018-06-07T03:36:04Z","updated_at":"2018-06-07T03:36:04Z","author_association":"NONE","body":"The token wasn't empty and persist login doesnt seem to be automatically set up for me any solution to this?"}}
{"actor":{"display_login":"GideonWislang"}}