Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add authentication #33

Open
cecilia-donnelly opened this issue Feb 1, 2016 · 1 comment
Open

Add authentication #33

cecilia-donnelly opened this issue Feb 1, 2016 · 1 comment

Comments

@cecilia-donnelly
Copy link

The OpenHMIS API now supports authentication, so the client app needs to do the same. I hinted at this in #32, but this is the explicit issue.

We won't set up a proper workflow for this right now, but eventually we probably want to add a sign-in page before the search page. Only authenticated users will be able to make API requests.

cecilia-donnelly added a commit that referenced this issue Feb 2, 2016
Link to the explanation of how to get a Google client ID for
authentication.  Save this ID in a config file.  Store the generated
client_id in the page and use it for signin.

Since the client-side javascript already needed to have this client_id,
I don't think that embedding it in the page is a problem.
@cecilia-donnelly
Copy link
Author

To make this work: add a login page in front of the search/home page that calls out to Google/the API, just like the signup page on the OpenHMIS server itself. Once the user has authenticated, use the returned id token in all requests to the API (that is, add an authorization header to each request in client.server.controller.js).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant