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

Update documentation for oauth and other new features #209

Open
6 tasks
jabelone opened this issue Sep 2, 2023 · 6 comments
Open
6 tasks

Update documentation for oauth and other new features #209

jabelone opened this issue Sep 2, 2023 · 6 comments

Comments

@jabelone
Copy link
Member

jabelone commented Sep 2, 2023

A few new features have been added, but they have not been documented. The following documentation needs to be written:

  • oauth2 / oidc provider
  • public access system status endpoint
  • public door bump API for integrating door bumping from remote systems
  • public debit (for vending machines etc.) API endpoint
  • list of links able to be added to homepage cards
  • postgres database backend env vars config
@proffalken
Copy link
Contributor

Would be good to get some docs on the API as well - I'm happy to write some of them.

The /debit API is of particular interest as I'm not quite sure how I associate a call from a device such as a vending machine or 3D printer management system with a specific user.

@jabelone
Copy link
Member Author

jabelone commented Sep 2, 2023

It's done by supplying their RFID card number in the API request. You can see how the old vending machine firmware used to do it here: https://github.com/HSBNE/VendingMachine/blob/db6c5e38621be9088b0f85e790960ae4049fdea8/RFID_Vending_Machine/RFID_Vending_Machine.ino#L184

@proffalken
Copy link
Contributor

I saw some code to interact with Moodle as well on the latest dev branch, any chance we can get documentation on that as well please? :)

@jabelone
Copy link
Member Author

jabelone commented Sep 7, 2023

It's coming! 🤣 Will get a chance to get to your outstanding PRs and this issue on the weekend. I got fed up of how much of a pain Canvas is so decided to add support for Moodle. It's working on my dev instance, but would like to test on our prod instance before adding it to a release. With the new oauth (which Moodle supports) it's super nice for members to login/do the induction.

@proffalken
Copy link
Contributor

🤣 There's really no rush, I've just managed to find time to do stuff with this recently that I otherwise wouldn't have done!

Appreciate you're also doing this in your spare time, love the inclusion of Moodle though, Canvas felt really clunky when I tried to implement it, so I just skipped it instead! 😛

@jabelone
Copy link
Member Author

jabelone commented Sep 7, 2023

yeah canvas is too complex to run our own instance so we opted to use canvas cloud. However, we found that canvas cloud was super limiting in terms of their API, oauth, etc. Users have to register with the same email in MM, and the canvas UX for returning users who aren't logged in is awful. We've had so many people try to come back to canvas halfway through (or users who've used canvas elsewhere prior) unable to complete the induction because of how bad it is.

Moodle is reasonably easy to setup and run your own instance on and supports oauth. It works well on my local dev instance and means during induction you just click "start induction" which kicks you to Moodle, and auto logs in if oauth is configured correctly. 100 times better than the Canvas flow. The intention with Moodle is to eventually hook it up to interlocks and automatically provision access to certain (low risk) tools after the relevant course is completed.

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

2 participants