azavea / temperate

Climate app developed in partnership with ICLEI
Apache License 2.0
0 stars 0 forks source link

PlanIt user cannot refresh token in Django UI view if they don't have one yet #150

Open CloudNiner opened 6 years ago

CloudNiner commented 6 years ago

Clicking the "refresh token" button in the UI throws:

https://rollbar.com/Azavea/ClimateChange/items/82/

rmartz commented 6 years ago

Should users need to refresh a token to have on, or be given a token on account creation?

CloudNiner commented 6 years ago

A token is automatically created when you hit /api-token-auth/ for the first time with valid credentials, which is the way the application will actually use tokens. I don't expect us to actually use these views, so this can be deferred, but if we do want to address this we'll likely want to create a token for each user when the user is created.

flibbertigibbet commented 6 years ago

A token should be created with the user.

flibbertigibbet commented 6 years ago

Users created via the registration flow or via the DRF API endpoint will have a token.