-
Notifications
You must be signed in to change notification settings - Fork 11
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
OAuth implementation #16
Conversation
rfd-api/src/authn/key.rs
Outdated
|
||
pub struct NewApiKey { | ||
pub struct RawApiKey { | ||
clear: String, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clear: String, | |
clear: secrecy::SecretString, |
Sounds like a good candidate for secrecy::SecretString
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been changed to a Vec<u8>
and I'm looking at wrapping it with zeroize
This should be ready for initial review. Few known issues:
|
This replaces the openid (Google) and access token (GitHub) authentication methods with an OAuth implementation. This implementation forwards authentication to Google or GitHub and transforms the returned user into an RFD API user. Changes here fix #1, #2, and #9.
There are still a few outstanding issues:
state
parameter is corrupted (or not returned) by a remote OAuth system we can not determine what login attempt the call was for. This likely needs to be fixed by storing short-lived session data on the client system prior to redirecting to the remote provider.