eclipse-oct / open-collaboration-tools

Open Collaboration Tools: live-sharing solution for Eclipse Theia, VS Code and other editors and IDEs
https://www.open-collab.tools/
MIT License
98 stars 4 forks source link

Custom Oauth2/OIDC provider? #43

Open poVoq opened 3 months ago

poVoq commented 3 months ago

I would like to link a self-hosted OCT server to my own Forgejo/Gitea instance which can act as a Oauth2/OIDC provider.

From the looks of it, the OCT server currently only supports some hard-coded Oauth2 providers (Google and Github?) but you can't specify a custom Oauth2 provider URL (and Name) via ENVs parameters.

Thanks!

msujew commented 3 months ago

Hey @poVoq,

you're right, it's currently unsupported. We'll likely get to this soon 👍

yuvipanda commented 3 months ago

Excited to try integrate this with jupyterhub and code-server once this feature is implemented!

spoenemann commented 3 months ago

Hi @poVoq @yuvipanda, there's another way to solve this even before the additional configuration options are done: use open-collaboration-server as a library to create your own custom server.

See oauth-endpoint.ts how OAuth2 providers are specified.

You can create your own implementation and bind it to the dependency injection system as seen in container.ts.

Then you can create your own app like in app.ts and load your own InversifyJS container.

The API is in a very early stage and is likely to be broken. In particular, we might switch the dependency injection library (#21). But creating your own custom server app is definitely a scenario we want to support.

yuvipanda commented 3 months ago

Thank you for that information, @spoenemann!

I'll unfortunately still just have to wait at least for this feature to land mostly due to time and capacity constraints. So I'll just watch this with excitement :)

Thank you for working on this!