pelican-dev / panel

https://pelican.dev
GNU Affero General Public License v3.0
602 stars 72 forks source link

Oauth (via socialite) #385

Open Boy132 opened 2 weeks ago

Boy132 commented 2 weeks ago

https://laravel.com/docs/11.x/socialite https://socialiteproviders.com/

KeySC07 commented 2 weeks ago

Would be nice to see an option for JIT(Just-In-Time) provisioning added to create users upon sign-in via SSO.

timoschirmer commented 2 weeks ago

Would love to see support for authentik or some kind of generic oauth2 provider in the future.

KeySC07 commented 2 weeks ago

Would love to see support for authentik or some kind of generic oauth2 provider in the future.

Authentik is already supported see here https://socialiteproviders.com/Authentik/#installation-basic-usage just gotta make some changes to get it working.

andyondrya commented 2 weeks ago

Weird migration error,



   INFO  Running migrations.  

  2024_06_13_120409_add_oauth_column_to_users .............................................................................. 1.30ms FAIL

In Connection.php line 813:

  SQLSTATE[HY000]: General error: 1 Cannot add a NOT NULL column with default value NULL (Connection: sqlite, SQL: alter table "users"   
  add column "oauth" text not null)                                                                                                      

In Connection.php line 571:

  SQLSTATE[HY000]: General error: 1 Cannot add a NOT NULL column with default value NULL
RMartinOscar commented 2 weeks ago

Weird migration error,

   INFO  Running migrations.  

  2024_06_13_120409_add_oauth_column_to_users .............................................................................. 1.30ms FAIL

In Connection.php line 813:

  SQLSTATE[HY000]: General error: 1 Cannot add a NOT NULL column with default value NULL (Connection: sqlite, SQL: alter table "users"   
  add column "oauth" text not null)                                                                                                      

In Connection.php line 571:

  SQLSTATE[HY000]: General error: 1 Cannot add a NOT NULL column with default value NULL

Fixed in PR #409

KeySC07 commented 2 weeks ago

Would be nice to see enforce MFA as an option as well.

Using the amr attribute within the OAuth token contains the types auth the user has completed at the identity provider, an example: "amr": [ "pwd", "mfa" ],

You could use this to add an option to enforce MFA which would deny the login if the amr token doesn't contain "mfa".