Add Authentik SSO via OAuth2/OIDC
Implements Single Sign-On with Authentik alongside the existing password login. Admins configure Client ID, Client Secret and Base URL directly in the app; the SSO button on the login page only appears when the configuration is complete and enabled. - SsoSetting model + migration (one-row config table) - sso_provider_id / is_sso_user fields on users (migration) - SsoController: redirect to Authentik + callback (token exchange, userinfo fetch, auto-create unknown users) - Admin\SsoSettingController + admin/sso/show view with setup guide and one-click Redirect URI copy - Admin dropdown: SSO-Konfiguration entry - Login page: Authentik button rendered conditionally No additional Composer packages required. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
c5fe3ad808
commit
60259a3655
@@ -74,6 +74,21 @@
|
||||
</button>
|
||||
</form>
|
||||
|
||||
@php $sso = \App\Models\SsoSetting::get(); @endphp
|
||||
@if($sso->isConfigured())
|
||||
<div class="d-flex align-items-center my-4" style="gap:12px;">
|
||||
<hr style="flex:1; border-color:rgba(0,0,0,.12); margin:0;">
|
||||
<span style="font-size:.78rem; color:#9ca3af; white-space:nowrap;">oder</span>
|
||||
<hr style="flex:1; border-color:rgba(0,0,0,.12); margin:0;">
|
||||
</div>
|
||||
<a href="{{ route('sso.redirect') }}" class="btn btn-outline-secondary w-100 btn-lg d-flex align-items-center justify-content-center gap-2">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20A14.5 14.5 0 0 0 12 2"/><path d="M2 12h20"/>
|
||||
</svg>
|
||||
Mit Authentik anmelden
|
||||
</a>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user