# python-auth0-disable-inactive-users

Deativate inactive Auth0 users (who haven't logged in in some time).

## Logic

Paginate through all users.

### Blocked property
It was not possible to search where `user.blocked == False` because if a user has not been blocked or unblocked, it will not have the `blocked` property.

### Last Login / Created At
If a user has not logged in at all, they will not have the `last_login` property, and will have to fallback on `created_at` in the evaluation of inactivity.


## Env vars
In production, these will likely be set in the Jenkins job. But for local, set the values in .env and source
```bash
source .env
```

## Make

### env
```bash
make env
```

### run
```bash
make run
```

### lint
```bash
make lint
```

### test
```bash
make test
```

#### test with html coverage report
```bash
make html_coverage
```
A folder named `htmlcov` will be created with HTML output of code coverage.
