openbikesensor / openbikesensor/OpenBikeSensorFirmware
Implement new OAuth flow
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 124
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
Starting v0.2, the Portal will have a proper OAuth Authorization Code flow implemented and we can use that in the configserver to connect a user account. It allows us to have a simple "Log in with OpenBikeSensor Portal" button instead of having to copy-paste API Keys.
This is a bit of code, and can be implemented in 95% JavaScript for developer convenience. It will require:
- A JS file to include in the login flow pages
- A redirect endpoint that handles the login
- A configuration of the client id and auth server URL, for which we should compile in the defaults
- A refresh token will be issued that has to be exchanged for an access token before uploading to the portal, so one additional request before the uploading can begin. The access token is valid for an hour or so, so it can be used for all subsequent uploads.
This does not yet work on the currently deployed HLRS instance, but that one is deprecated anyway. We can already start writing this component and release it when we have the new portal up and running.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the configserver login flow and upload path described in the issue. Review how the JavaScript login pages, redirect endpoint, client configuration, and refresh-token exchange fit together, then confirm the new Portal's OAuth endpoints. Done means users can log in through the Portal and upload using the refreshed access token.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, javascript
- Domain
- api, authentication
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100