script-server icon indicating copy to clipboard operation
script-server copied to clipboard

feature(auth): Azure AD OAuth

Open 0lionelzhang0 opened this issue 1 year ago • 2 comments

Hello!

Thank you bugy for this amazing tool. I was wondering if there are any plans to add auth support for Azure AD OAuth?

If not, would you mind providing some pointers on how one could implement that?

Thanks!

0lionelzhang0 avatar Mar 25 '24 16:03 0lionelzhang0

Hi, unfortunately, it's not supported. But if it's more or less the standard OAuth implementation, it should be quite straightforward to implement. Here is an example of Google OAuth: https://github.com/bugy/script-server/blob/master/src/auth/auth_google_oauth.py It's pretty small, since the main implementation is located in the parent OAuth class: https://github.com/bugy/script-server/blob/master/src/auth/auth_abstract_oauth.py

Besides this class, the following things should be updated:

  • https://github.com/bugy/script-server/blob/6015e14bfc286f0ad48ad61671706112672a6fee/src/model/server_conf.py#L222 (add an initialization for a new type)
  • https://github.com/bugy/script-server/blob/master/web-src/src/login/login.js (UI component, responsible for login flow)

bugy avatar Mar 26 '24 10:03 bugy

Thank you, bugy. I will look into it!

0lionelzhang0 avatar Mar 26 '24 15:03 0lionelzhang0