{"action":"closed","issue":{"url":"https://api.github.com/repos/lynndylanhurley/ng-token-auth/issues/176","labels_url":"https://api.github.com/repos/lynndylanhurley/ng-token-auth/issues/176/labels{/name}","comments_url":"https://api.github.com/repos/lynndylanhurley/ng-token-auth/issues/176/comments","events_url":"https://api.github.com/repos/lynndylanhurley/ng-token-auth/issues/176/events","html_url":"https://github.com/lynndylanhurley/ng-token-auth/issues/176","id":95234245,"number":176,"title":"Does validateUser() reload $auth.user from the backend?","user":{"login":"davidtlee","id":863081,"avatar_url":"https://avatars.githubusercontent.com/u/863081?v=3","gravatar_id":"","url":"https://api.github.com/users/davidtlee","html_url":"https://github.com/davidtlee","followers_url":"https://api.github.com/users/davidtlee/followers","following_url":"https://api.github.com/users/davidtlee/following{/other_user}","gists_url":"https://api.github.com/users/davidtlee/gists{/gist_id}","starred_url":"https://api.github.com/users/davidtlee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidtlee/subscriptions","organizations_url":"https://api.github.com/users/davidtlee/orgs","repos_url":"https://api.github.com/users/davidtlee/repos","events_url":"https://api.github.com/users/davidtlee/events{/privacy}","received_events_url":"https://api.github.com/users/davidtlee/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-15T16:22:41Z","updated_at":"2015-07-29T19:43:42Z","closed_at":"2015-07-29T19:43:42Z","body":"In my app, I have a `phone_verified` boolean column on `user`. If the user has verified their phone, I route them to the main app, if not, I route them to an onboarding process.\r\n\r\nRight now, after a user goes through onboarding, I can see that `u.phone_verified` is true for that user (through the rails console). However, on the frontend, it still believes that `u.phone_verified` is false. The place where I route the user is within an `$auth.validateUser()` callback, so I was thinking that the user object within the callback should be updated. But an `alert(user.phone_verified)` indicates that this column is still false.\r\n\r\nSo my question is: Does `$auth.validateUser()` go to the server and get the user object? If not, how can I get the user object?\r\n\r\nOther configuration notes that might be relevant just in case:\r\n* In my devise_token_auth setup, I set `config.change_headers_on_each_request = false`\r\n* I wrote on override for the `omniauth_callbacks_controller#omniauth_success` action and the `omniauth_response.html.erb` and `omniauth_success.html.erb` templates\r\n\r\nThanks!"}}