Add OpenID Connect integration#142
Conversation
| process.env.RODE_URL || "http://localhost:50051"; | ||
|
|
||
| const fetch = (endpoint, method, body) => { | ||
| const fetch = ({ endpoint, method, body, accessToken }) => { |
There was a problem hiding this comment.
Picky: would it be a good idea to keep the getRodeUrl() function and have that call out to config.get("rode.url") so if the config key ever changes, the change is only needed in one place?
The get/post/etc utils could also call to get this value since we're not calling anything other than Rode right now but that could change in the future, I suppose.
There was a problem hiding this comment.
I don't feel too strongly, but I think I'd rather have a wrapper around the get/ patch / del / post utils that is pre-configured to call Rode. That would eliminate a lot of these call sites for the config and maybe centralize some of the error handling.
mrparkers
left a comment
There was a problem hiding this comment.
One comment but otherwise LGTM.
Perhaps a future enhancement - it would be nice if the UI let the user know that a particular API call was unauthorized instead of displaying a generic server error. I don't expect this to happen in this PR though.
Co-authored-by: Michael Parker <michael@parker.gg>
Remaining work
add login/logout buttonsdisplay authenticated username and maybe rolenextdevflag dynamicallyThose first two will be a follow up, navigating to
/loginor/logoutshould work in the meantime. Auth is disabled by default.Closes #140