{"action":"created","issue":{"url":"https://api.github.com/repos/digidem/mapfilter/issues/24","labels_url":"https://api.github.com/repos/digidem/mapfilter/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/digidem/mapfilter/issues/24/comments","events_url":"https://api.github.com/repos/digidem/mapfilter/issues/24/events","html_url":"https://github.com/digidem/mapfilter/pull/24","id":125700386,"number":24,"title":"Feature/auth0","user":{"login":"jlev","id":294964,"avatar_url":"https://avatars.githubusercontent.com/u/294964?v=3","gravatar_id":"","url":"https://api.github.com/users/jlev","html_url":"https://github.com/jlev","followers_url":"https://api.github.com/users/jlev/followers","following_url":"https://api.github.com/users/jlev/following{/other_user}","gists_url":"https://api.github.com/users/jlev/gists{/gist_id}","starred_url":"https://api.github.com/users/jlev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlev/subscriptions","organizations_url":"https://api.github.com/users/jlev/orgs","repos_url":"https://api.github.com/users/jlev/repos","events_url":"https://api.github.com/users/jlev/events{/privacy}","received_events_url":"https://api.github.com/users/jlev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-01-08T21:41:03Z","updated_at":"2016-01-15T19:15:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/digidem/mapfilter/pulls/24","html_url":"https://github.com/digidem/mapfilter/pull/24","diff_url":"https://github.com/digidem/mapfilter/pull/24.diff","patch_url":"https://github.com/digidem/mapfilter/pull/24.patch"},"body":"@gmaclennan, here's an initial working implementation of authentication using Auth0. It requires a config entry with a valid clientID and domain. Existing authentication by prompt continues to work if the config value is 'true' true.\r\n\r\nAllowed email addresses are checked against a whitelist in Dropbox, and anything from the domain digital-democracy.org (or spacedog.xyz, for testing) is automatically allowed. Rules to enforce this are included in the `rules` directory, and can be synced to Auth0 [via github webhook](https://auth0.com/docs/source-control), although I've found this feature a little buggy. \r\n\r\nThe login text will be translated into the current locale, although I haven't yet merged in changes to pull that from the navigator property. I can also add a language selector dropdown, if that would be easier for users to adjust."},"comment":{"url":"https://api.github.com/repos/digidem/mapfilter/issues/comments/172057549","html_url":"https://github.com/digidem/mapfilter/pull/24#issuecomment-172057549","issue_url":"https://api.github.com/repos/digidem/mapfilter/issues/24","id":172057549,"user":{"login":"jlev","id":294964,"avatar_url":"https://avatars.githubusercontent.com/u/294964?v=3","gravatar_id":"","url":"https://api.github.com/users/jlev","html_url":"https://github.com/jlev","followers_url":"https://api.github.com/users/jlev/followers","following_url":"https://api.github.com/users/jlev/following{/other_user}","gists_url":"https://api.github.com/users/jlev/gists{/gist_id}","starred_url":"https://api.github.com/users/jlev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlev/subscriptions","organizations_url":"https://api.github.com/users/jlev/orgs","repos_url":"https://api.github.com/users/jlev/repos","events_url":"https://api.github.com/users/jlev/events{/privacy}","received_events_url":"https://api.github.com/users/jlev/received_events","type":"User","site_admin":false},"created_at":"2016-01-15T19:15:13Z","updated_at":"2016-01-15T19:15:13Z","body":"Added code to parse JSON response from GitHub, and only trigger logout on auth errors. I determine that by checking if message === \"Bad credentials\", because we don't have access to the headers at that point. This will be brittle if they change the error message, but should be good enough for simple authentication.\r\n\r\nReady to merge? "}}