Conversation
Add log in and log out buttons using Auth0 for authorization and authentication
martukas
left a comment
There was a problem hiding this comment.
In addition to the code comments:
- you should install pre-commit hooks to help with code style & autoformatting, then the CI test will pass. I think the article in the ventilator wiki will apply to this repo just the same: https://github.com/RespiraWorks/Ventilator/wiki/git-precommit-hooks
- it would help if you would provide a link to an instance of this that you have deployed somewhere for testing? In the future we should maybe have some semi-automatic way to do thsi for PRs. I added some comments to #14 , which may actually be a good next task to tackle.
| <App /> | ||
| </React.StrictMode> | ||
| <Auth0Provider | ||
| domain="dev-gi520dy8.us.auth0.com" |
There was a problem hiding this comment.
are these ok to go into public repository, or should they be part of the .env file? If the latter, please update documentation to explain that additional fields are needed and where to get the values for them.
| <Route path="/dataset" element={<DataSet />} /> | ||
| <Route path="*" element={<NotFound />} /> | ||
| </Routes> | ||
| <LoginButton/> |
There was a problem hiding this comment.
So, the way most websites are, I think, is what users will expect:
- login page (rather than just button) only visible when you are not logged in, and it redirects to this page whenever you try to access something that requires authorization
- user profile info probably visible on the navbar on the right (and only when logged in), and logout is an option with a dropdown from that
I guess let's think of Google itself as the template for how people expect these to work?
I think most of this can be done pretty easily within the bootstrap framework. The auto-redirect thing is also abstracted by something like this:
https://github.com/jaredhanson/connect-ensure-login
and I had a few more links to useful things on the ticket #3
Add log in and log out buttons using Auth0 for authorization and authentication