bountysource / bountysource/core

Better authentication

Open
#591 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
643
Forks
199
PR merge metrics
No merged PRs in 30d

Description

There needs to be a better way to determine if there is a logged in user than watching `$scope.current_person`.

We should pull all of the authentication logic out of `$api` into a new service (`$auth` ?). I want to do something in a controller like:

``` javascript
$auth.promise.then(function(person) {
if (angular.isObject(person)) {
// person logged in, do stuff
} else if (person === false) {
// person logged out, do other stuff
}
});
```

Basically the same thing, just not relying on a `$watch`
##

Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/1936287-better-authentication?utm_campaign=plugin&utm_content=tracker%2F47&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F47&utm_medium=issues&utm_source=github).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.