RomainMichau / ActixWeb_openIDConnect

Lightweight async OpenID Connect (OIDC) client and middleware for Actix-Web.
5 stars 2 forks source link

add example of using multiple different providers #3

Closed programmerjake closed 6 months ago

programmerjake commented 7 months ago

e.g. if I want to build a website that allows authentication using both GitHub and Google, can this library do that?

RomainMichau commented 7 months ago

This is not something common afaik. Usually in order to achieve that, you will have a primary IDP with which your app will exclusively communicate. And to support google/github auth you will configure an IDP federation between your primary IDP and google/github (ex: Configuring a federation keycloak => google).

This will allow you to hide auth implementation details from your website, and configure that directly on IDP level

programmerjake commented 7 months ago

This is not something common afaik.

Well, Forgejo and Gitea both seem to directly use external IDPs without an intermediate IDP, using the Go library: https://github.com/markbates/goth

RomainMichau commented 7 months ago

That's true A factor helping them to do that is that goth issue it's own session cookies, while ActixWeb_openIDConnect rely directly on IDP access token Right now this package wont allow you to do what you're looking for