emmett-framework / emmett

The web framework for inventors
Other
1.04k stars 70 forks source link

Oauth/openid support #289

Open Kkeller83 opened 4 years ago

Kkeller83 commented 4 years ago

Could you add openid/oauth2 sso support to emmett please? ;)

gi0baro commented 3 years ago

@Kkeller83 OpenID/Oauth2 is quite a huge topic.

Maybe you can describe this a bit more or give us an idea about which features do you expect to have? Or even a 3rd part framework/project you have in mind as a comparison?

I think this can be an extension (I'm not sure should be part of the framework itself), but I need more details in order to build up a plan.

Kkeller83 commented 3 years ago

So I prototyped an application in web2py, which I was about port a implement in py4web, the successor framework of web2py this week, but I also followed your framwork and it looks really compelling. Thing is I really need the app to support SSO via OIDC. That is the main use case. With py4web I have already figured out how to do SSO via Okta, Akamai Identity Cloud and KeyCloak through OIDC, but with Emmett I did not see I straight forward way other than coding it myself, which I was thinking about and base it on your old weppy oidc/oauth plugin. But as everyone I am in a bit of time squeeze and you know the framework better and did in the past with weppy so I thought for you maybe its not such a big deal, but I am happy to help as well

gi0baro commented 2 years ago

@Kkeller83 FYI I put together some SSO code (Github only at the moment) in an app I published recently, see:

This implementation is quite specific, since I need to check additional attributes in github data, and also the templating part is quite project-related, but it might be a good starting point.

I think it might be possible to make a generic extension out of that code, as soon as more providers are implemented.