A cross platform Audiobookshelf client for Android and iOS
Dart
Add an Authentication page to the server admin section for setting up password and OpenID sign-in
Barnabas7bfbe7e0dd6b
diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arbindex 4ca2bc3f..9b752e93 100644--- a/lib/l10n/app_en.arb+++ b/lib/l10n/app_en.arb@@ -4634,6 +4634,8 @@"adminUploadReselectFiles": "Choose the files again before retrying.","adminServerSettings": "Server settings","adminServerSettingsSubtitle": "Scanner, storage and sorting",+ "adminAuthentication": "Authentication",+ "adminAuthenticationSubtitle": "Password and OpenID Connect sign-in","adminStats": "Statistics","adminStatsSubtitle": "Library and listening totals","adminAllSessions": "All sessions",@@ -4684,6 +4686,81 @@"srvSaveFailed": "Couldn't save settings","srvPrefixesSaved": "Sorting prefixes updated",+ "authSetLoadFailed": "Couldn't load authentication settings",+ "authSetCustomMessage": "Custom message on login",+ "authSetMessage": "Message",+ "authSetPasswordAuth": "Password authentication",+ "authSetOpenId": "OpenID Connect authentication",+ "authSetGuide": "Setup guide",+ "authSetIssuerUrl": "Issuer URL",+ "authSetAutoPopulate": "Auto-populate",+ "authSetAuthorizeUrl": "Authorize URL",+ "authSetTokenUrl": "Token URL",+ "authSetUserinfoUrl": "Userinfo URL",+ "authSetJwksUrl": "JWKS URL",+ "authSetLogoutUrl": "Logout URL",+ "authSetClientId": "Client ID",+ "authSetClientSecret": "Client secret",+ "authSetSigningAlgorithm": "Signing algorithm",+ "authSetRedirectUris": "Allowed mobile redirect URIs",+ "authSetRedirectUrisInfo": "Apps can only return to these addresses after sign-in. Absorb uses absorb://oauth. An asterisk (*) as the only entry allows any address.",+ "authSetAddRedirectUri": "Add URI",+ "authSetAddAbsorbRedirect": "Add absorb://oauth",+ "authSetSubfolder": "Subfolder for redirect URLs",+ "authSetSubfolderNone": "None",+ "authSetWebRedirectInfo": "Allow these URLs in your OAuth provider so sign-in can return to the web app:",+ "authSetButtonText": "Button text",+ "authSetMatchExisting": "Match existing users by",+ "authSetMatchNone": "Do not match",+ "authSetMatchEmail": "Email",+ "authSetMatchUsername": "Username",+ "authSetMatchExistingInfo": "Used to link existing users. Once linked, users are matched by their unique ID from the provider.",+ "authSetAutoLaunch": "Auto launch",+ "authSetAutoLaunchInfo": "Open the provider automatically from the web login page. /login?autoLaunch=0 skips it.",+ "authSetAutoRegister": "Auto register",+ "authSetAutoRegisterInfo": "Create new users automatically after they sign in",+ "authSetClaimsInfo": "Leave these empty to turn off group and permission assignment. New users then get the User role.",+ "authSetGroupClaim": "Group claim",+ "authSetGroupClaimInfo": "Claim that lists the user's groups, usually groups. Groups named admin, user or guest set the role, and the highest one wins. If no group matches, sign-in is refused.",+ "authSetPermsClaim": "Advanced permission claim",+ "authSetPermsClaimInfo": "Claim with permissions for non-admin users. If the claim is missing, sign-in is refused, and a missing option counts as off. Expected format:",+ "authSetRestartNote": "Restart the server after saving to apply OpenID Connect changes.",+ "authSetNoChanges": "No changes to save",+ "authSetNeedOneMethod": "Turn on at least one sign-in method",+ "authSetFieldRequired": "{field} is required",+ "@authSetFieldRequired": {+ "placeholders": {+ "field": {+ "type": "String"+ }+ }+ },+ "authSetInvalidRedirectUri": "Invalid redirect URI: {uri}",+ "@authSetInvalidRedirectUri": {+ "placeholders": {+ "uri": {+ "type": "String"+ }+ }+ },+ "authSetAsteriskAlone": "An asterisk (*) must be the only redirect URI",+ "authSetInvalidClaim": "{field} is not a valid claim name",+ "@authSetInvalidClaim": {+ "placeholders": {+ "field": {+ "type": "String"+ }+ }+ },+ "authSetIssuerFailed": "Couldn't read the issuer: {error}",+ "@authSetIssuerFailed": {+ "placeholders": {+ "error": {+ "type": "String"+ }+ }+ },+"libNoneYet": "No libraries yet","libReorderFailed": "Couldn't save the new order","libDeleteTitle": "Delete library?",diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dartindex f6eff66e..728842b9 100644--- a/lib/l10n/app_localizations.dart+++ b/lib/l10n/app_localizations.dart@@ -13599,6 +13599,18 @@ abstract class AppLocalizations {/// **'Scanner, storage and sorting'**String get adminServerSettingsSubtitle;+ /// No description provided for @adminAuthentication.+ ///+ /// In en, this message translates to:+ /// **'Authentication'**+ String get adminAuthentication;++ /// No description provided for @adminAuthenticationSubtitle.+ ///+ /// In en, this message translates to:+ /// **'Password and OpenID Connect sign-in'**+ String get adminAuthenticationSubtitle;+/// No description provided for @adminStats.////// In en, this message translates to:@@ -13881,6 +13893,282 @@ abstract class AppLocalizations {/// **'Sorting prefixes updated'**String get srvPrefixesSaved;+ /// No description provided for @authSetLoadFailed.+ ///+ /// In en, this message translates to:+ /// **'Couldn\'t load authentication settings'**+ String get authSetLoadFailed;++ /// No description provided for @authSetCustomMessage.+ ///+ /// In en, this message translates to:+ /// **'Custom message on login'**+ String get authSetCustomMessage;++ /// No description provided for @authSetMessage.+ ///+ /// In en, this message translates to:+ /// **'Message'**+ String get authSetMessage;++ /// No description provided for @authSetPasswordAuth.+ ///+ /// In en, this message translates to:+ /// **'Password authentication'**+ String get authSetPasswordAuth;++ /// No description provided for @authSetOpenId.+ ///+ /// In en, this message translates to:+ /// **'OpenID Connect authentication'**+ String get authSetOpenId;++ /// No description provided for @authSetGuide.+ ///+ /// In en, this message translates to:+ /// **'Setup guide'**+ String get authSetGuide;++ /// No description provided for @authSetIssuerUrl.+ ///+ /// In en, this message translates to:+ /// **'Issuer URL'**+ String get authSetIssuerUrl;++ /// No description provided for @authSetAutoPopulate.+ ///+ /// In en, this message translates to:+ /// **'Auto-populate'**+ String get authSetAutoPopulate;++ /// No description provided for @authSetAuthorizeUrl.+ ///+ /// In en, this message translates to:+ /// **'Authorize URL'**+ String get authSetAuthorizeUrl;++ /// No description provided for @authSetTokenUrl.+ ///+ /// In en, this message translates to:+ /// **'Token URL'**+ String get authSetTokenUrl;++ /// No description provided for @authSetUserinfoUrl.+ ///+ /// In en, this message translates to:+ /// **'Userinfo URL'**+ String get authSetUserinfoUrl;++ /// No description provided for @authSetJwksUrl.+ ///+ /// In en, this message translates to:+ /// **'JWKS URL'**+ String get authSetJwksUrl;++ /// No description provided for @authSetLogoutUrl.+ ///+ /// In en, this message translates to:+ /// **'Logout URL'**+ String get authSetLogoutUrl;++ /// No description provided for @authSetClientId.+ ///+ /// In en, this message translates to:+ /// **'Client ID'**+ String get authSetClientId;++ /// No description provided for @authSetClientSecret.+ ///+ /// In en, this message translates to:+ /// **'Client secret'**+ String get authSetClientSecret;++ /// No description provided for @authSetSigningAlgorithm.+ ///+ /// In en, this message translates to:+ /// **'Signing algorithm'**+ String get authSetSigningAlgorithm;++ /// No description provided for @authSetRedirectUris.+ ///+ /// In en, this message translates to:+ /// **'Allowed mobile redirect URIs'**+ String get authSetRedirectUris;++ /// No description provided for @authSetRedirectUrisInfo.+ ///+ /// In en, this message translates to:+ /// **'Apps can only return to these addresses after sign-in. Absorb uses absorb://oauth. An asterisk (*) as the only entry allows any address.'**+ String get authSetRedirectUrisInfo;++ /// No description provided for @authSetAddRedirectUri.+ ///+ /// In en, this message translates to:+ /// **'Add URI'**+ String get authSetAddRedirectUri;++ /// No description provided for @authSetAddAbsorbRedirect.+ ///+ /// In en, this message translates to:+ /// **'Add absorb://oauth'**+ String get authSetAddAbsorbRedirect;++ /// No description provided for @authSetSubfolder.+ ///+ /// In en, this message translates to:+ /// **'Subfolder for redirect URLs'**+ String get authSetSubfolder;++ /// No description provided for @authSetSubfolderNone.+ ///+ /// In en, this message translates to:+ /// **'None'**+ String get authSetSubfolderNone;++ /// No description provided for @authSetWebRedirectInfo.+ ///+ /// In en, this message translates to:+ /// **'Allow these URLs in your OAuth provider so sign-in can return to the web app:'**+ String get authSetWebRedirectInfo;++ /// No description provided for @authSetButtonText.+ ///+ /// In en, this message translates to:+ /// **'Button text'**+ String get authSetButtonText;++ /// No description provided for @authSetMatchExisting.+ ///+ /// In en, this message translates to:+ /// **'Match existing users by'**+ String get authSetMatchExisting;++ /// No description provided for @authSetMatchNone.+ ///+ /// In en, this message translates to:+ /// **'Do not match'**+ String get authSetMatchNone;++ /// No description provided for @authSetMatchEmail.+ ///+ /// In en, this message translates to:+ /// **'Email'**+ String get authSetMatchEmail;++ /// No description provided for @authSetMatchUsername.+ ///+ /// In en, this message translates to:+ /// **'Username'**+ String get authSetMatchUsername;++ /// No description provided for @authSetMatchExistingInfo.+ ///+ /// In en, this message translates to:+ /// **'Used to link existing users. Once linked, users are matched by their unique ID from the provider.'**+ String get authSetMatchExistingInfo;++ /// No description provided for @authSetAutoLaunch.+ ///+ /// In en, this message translates to:+ /// **'Auto launch'**+ String get authSetAutoLaunch;++ /// No description provided for @authSetAutoLaunchInfo.+ ///+ /// In en, this message translates to:+ /// **'Open the provider automatically from the web login page. /login?autoLaunch=0 skips it.'**+ String get authSetAutoLaunchInfo;++ /// No description provided for @authSetAutoRegister.+ ///+ /// In en, this message translates to:+ /// **'Auto register'**+ String get authSetAutoRegister;++ /// No description provided for @authSetAutoRegisterInfo.+ ///+ /// In en, this message translates to:+ /// **'Create new users automatically after they sign in'**+ String get authSetAutoRegisterInfo;++ /// No description provided for @authSetClaimsInfo.+ ///+ /// In en, this message translates to:+ /// **'Leave these empty to turn off group and permission assignment. New users then get the User role.'**+ String get authSetClaimsInfo;++ /// No description provided for @authSetGroupClaim.+ ///+ /// In en, this message translates to:+ /// **'Group claim'**+ String get authSetGroupClaim;++ /// No description provided for @authSetGroupClaimInfo.+ ///+ /// In en, this message translates to:+ /// **'Claim that lists the user\'s groups, usually groups. Groups named admin, user or guest set the role, and the highest one wins. If no group matches, sign-in is refused.'**+ String get authSetGroupClaimInfo;++ /// No description provided for @authSetPermsClaim.+ ///+ /// In en, this message translates to:+ /// **'Advanced permission claim'**+ String get authSetPermsClaim;++ /// No description provided for @authSetPermsClaimInfo.+ ///+ /// In en, this message translates to:+ /// **'Claim with permissions for non-admin users. If the claim is missing, sign-in is refused, and a missing option counts as off. Expected format:'**+ String get authSetPermsClaimInfo;++ /// No description provided for @authSetRestartNote.+ ///+ /// In en, this message translates to:+ /// **'Restart the server after saving to apply OpenID Connect changes.'**+ String get authSetRestartNote;++ /// No description provided for @authSetNoChanges.+ ///+ /// In en, this message translates to:+ /// **'No changes to save'**+ String get authSetNoChanges;++ /// No description provided for @authSetNeedOneMethod.+ ///+ /// In en, this message translates to:+ /// **'Turn on at least one sign-in method'**+ String get authSetNeedOneMethod;++ /// No description provided for @authSetFieldRequired.+ ///+ /// In en, this message translates to:+ /// **'{field} is required'**+ String authSetFieldRequired(String field);++ /// No description provided for @authSetInvalidRedirectUri.+ ///+ /// In en, this message translates to:+ /// **'Invalid redirect URI: {uri}'**+ String authSetInvalidRedirectUri(String uri);++ /// No description provided for @authSetAsteriskAlone.+ ///+ /// In en, this message translates to:+ /// **'An asterisk (*) must be the only redirect URI'**+ String get authSetAsteriskAlone;++ /// No description provided for @authSetInvalidClaim.+ ///+ /// In en, this message translates to:+ /// **'{field} is not a valid claim name'**+ String authSetInvalidClaim(String field);++ /// No description provided for @authSetIssuerFailed.+ ///+ /// In en, this message translates to:+ /// **'Couldn\'t read the issuer: {error}'**+ String authSetIssuerFailed(String error);+/// No description provided for @libNoneYet.////// In en, this message translates to:diff --git a/lib/l10n/app_localizations_de.dart b/lib/l10n/app_localizations_de.dartindex 01c45145..a7d0a721 100644--- a/lib/l10n/app_localizations_de.dart+++ b/lib/l10n/app_localizations_de.dart@@ -8039,6 +8039,13 @@ class AppLocalizationsDe extends AppLocalizations {@overrideString get adminServerSettingsSubtitle => 'Scanner, Speicher und Sortierung';+ @override+ String get adminAuthentication => 'Authentication';++ @override+ String get adminAuthenticationSubtitle =>+ 'Password and OpenID Connect sign-in';+@overrideString get adminStats => 'Statistiken';@@ -8181,6 +8188,162 @@ class AppLocalizationsDe extends AppLocalizations {@overrideString get srvPrefixesSaved => 'Sortierungspräfixe aktualisiert';+ @override+ String get authSetLoadFailed => 'Couldn\'t load authentication settings';++ @override+ String get authSetCustomMessage => 'Custom message on login';++ @override+ String get authSetMessage => 'Message';++ @override+ String get authSetPasswordAuth => 'Password authentication';++ @override+ String get authSetOpenId => 'OpenID Connect authentication';++ @override+ String get authSetGuide => 'Setup guide';++ @override+ String get authSetIssuerUrl => 'Issuer URL';++ @override+ String get authSetAutoPopulate => 'Auto-populate';++ @override+ String get authSetAuthorizeUrl => 'Authorize URL';++ @override+ String get authSetTokenUrl => 'Token URL';++ @override+ String get authSetUserinfoUrl => 'Userinfo URL';++ @override+ String get authSetJwksUrl => 'JWKS URL';++ @override+ String get authSetLogoutUrl => 'Logout URL';++ @override+ String get authSetClientId => 'Client ID';++ @override+ String get authSetClientSecret => 'Client secret';++ @override+ String get authSetSigningAlgorithm => 'Signing algorithm';++ @override+ String get authSetRedirectUris => 'Allowed mobile redirect URIs';++ @override+ String get authSetRedirectUrisInfo =>+ 'Apps can only return to these addresses after sign-in. Absorb uses absorb://oauth. An asterisk (*) as the only entry allows any address.';++ @override+ String get authSetAddRedirectUri => 'Add URI';++ @override+ String get authSetAddAbsorbRedirect => 'Add absorb://oauth';++ @override+ String get authSetSubfolder => 'Subfolder for redirect URLs';++ @override+ String get authSetSubfolderNone => 'None';++ @override+ String get authSetWebRedirectInfo =>+ 'Allow these URLs in your OAuth provider so sign-in can return to the web app:';++ @override+ String get authSetButtonText => 'Button text';++ @override+ String get authSetMatchExisting => 'Match existing users by';++ @override+ String get authSetMatchNone => 'Do not match';++ @override+ String get authSetMatchEmail => 'Email';++ @override+ String get authSetMatchUsername => 'Username';++ @override+ String get authSetMatchExistingInfo =>+ 'Used to link existing users. Once linked, users are matched by their unique ID from the provider.';++ @override+ String get authSetAutoLaunch => 'Auto launch';++ @override+ String get authSetAutoLaunchInfo =>+ 'Open the provider automatically from the web login page. /login?autoLaunch=0 skips it.';++ @override+ String get authSetAutoRegister => 'Auto register';++ @override+ String get authSetAutoRegisterInfo =>+ 'Create new users automatically after they sign in';++ @override+ String get authSetClaimsInfo =>+ 'Leave these empty to turn off group and permission assignment. New users then get the User role.';++ @override+ String get authSetGroupClaim => 'Group claim';++ @override+ String get authSetGroupClaimInfo =>+ 'Claim that lists the user\'s groups, usually groups. Groups named admin, user or guest set the role, and the highest one wins. If no group matches, sign-in is refused.';++ @override+ String get authSetPermsClaim => 'Advanced permission claim';++ @override+ String get authSetPermsClaimInfo =>+ 'Claim with permissions for non-admin users. If the claim is missing, sign-in is refused, and a missing option counts as off. Expected format:';++ @override+ String get authSetRestartNote =>+ 'Restart the server after saving to apply OpenID Connect changes.';++ @override+ String get authSetNoChanges => 'No changes to save';++ @override+ String get authSetNeedOneMethod => 'Turn on at least one sign-in method';++ @override+ String authSetFieldRequired(String field) {+ return '$field is required';+ }++ @override+ String authSetInvalidRedirectUri(String uri) {+ return 'Invalid redirect URI: $uri';+ }++ @override+ String get authSetAsteriskAlone =>+ 'An asterisk (*) must be the only redirect URI';++ @override+ String authSetInvalidClaim(String field) {+ return '$field is not a valid claim name';+ }++ @override+ String authSetIssuerFailed(String error) {+ return 'Couldn\'t read the issuer: $error';+ }+@overrideString get libNoneYet => 'Noch keine Bibliotheken vorhanden';diff --git a/lib/l10n/app_localizations_el.dart b/lib/l10n/app_localizations_el.dartindex ab5c55a1..ab60eefc 100644--- a/lib/l10n/app_localizations_el.dart+++ b/lib/l10n/app_localizations_el.dart@@ -7927,6 +7927,13 @@ class AppLocalizationsEl extends AppLocalizations {@overrideString get adminServerSettingsSubtitle => 'Scanner, storage and sorting';+ @override+ String get adminAuthentication => 'Authentication';++ @override+ String get adminAuthenticationSubtitle =>+ 'Password and OpenID Connect sign-in';+@overrideString get adminStats => 'Statistics';@@ -8069,6 +8076,162 @@ class AppLocalizationsEl extends AppLocalizations {@overrideString get srvPrefixesSaved => 'Sorting prefixes updated';+ @override+ String get authSetLoadFailed => 'Couldn\'t load authentication settings';++ @override+ String get authSetCustomMessage => 'Custom message on login';++ @override+ String get authSetMessage => 'Message';++ @override+ String get authSetPasswordAuth => 'Password authentication';++ @override+ String get authSetOpenId => 'OpenID Connect authentication';++ @override+ String get authSetGuide => 'Setup guide';++ @override+ String get authSetIssuerUrl => 'Issuer URL';++ @override+ String get authSetAutoPopulate => 'Auto-populate';++ @override+ String get authSetAuthorizeUrl => 'Authorize URL';++ @override+ String get authSetTokenUrl => 'Token URL';++ @override+ String get authSetUserinfoUrl => 'Userinfo URL';++ @override+ String get authSetJwksUrl => 'JWKS URL';++ @override+ String get authSetLogoutUrl => 'Logout URL';++ @override+ String get authSetClientId => 'Client ID';++ @override+ String get authSetClientSecret => 'Client secret';++ @override+ String get authSetSigningAlgorithm => 'Signing algorithm';++ @override+ String get authSetRedirectUris => 'Allowed mobile redirect URIs';++ @override+ String get authSetRedirectUrisInfo =>+ 'Apps can only return to these addresses after sign-in. Absorb uses absorb://oauth. An asterisk (*) as the only entry allows any address.';++ @override+ String get authSetAddRedirectUri => 'Add URI';++ @override+ String get authSetAddAbsorbRedirect => 'Add absorb://oauth';++ @override+ String get authSetSubfolder => 'Subfolder for redirect URLs';++ @override+ String get authSetSubfolderNone => 'None';++ @override+ String get authSetWebRedirectInfo =>+ 'Allow these URLs in your OAuth provider so sign-in can return to the web app:';++ @override+ String get authSetButtonText => 'Button text';++ @override+ String get authSetMatchExisting => 'Match existing users by';++ @override+ String get authSetMatchNone => 'Do not match';++ @override+ String get authSetMatchEmail => 'Email';++ @override+ String get authSetMatchUsername => 'Username';++ @override+ String get authSetMatchExistingInfo =>+ 'Used to link existing users. Once linked, users are matched by their unique ID from the provider.';++ @override+ String get authSetAutoLaunch => 'Auto launch';++ @override+ String get authSetAutoLaunchInfo =>+ 'Open the provider automatically from the web login page. /login?autoLaunch=0 skips it.';++ @override+ String get authSetAutoRegister => 'Auto register';++ @override+ String get authSetAutoRegisterInfo =>+ 'Create new users automatically after they sign in';++ @override+ String get authSetClaimsInfo =>+ 'Leave these empty to turn off group and permission assignment. New users then get the User role.';++ @override+ String get authSetGroupClaim => 'Group claim';++ @override+ String get authSetGroupClaimInfo =>+ 'Claim that lists the user\'s groups, usually groups. Groups named admin, user or guest set the role, and the highest one wins. If no group matches, sign-in is refused.';++ @override+ String get authSetPermsClaim => 'Advanced permission claim';++ @override+ String get authSetPermsClaimInfo =>+ 'Claim with permissions for non-admin users. If the claim is missing, sign-in is refused, and a missing option counts as off. Expected format:';++ @override+ String get authSetRestartNote =>+ 'Restart the server after saving to apply OpenID Connect changes.';++ @override+ String get authSetNoChanges => 'No changes to save';++ @override+ String get authSetNeedOneMethod => 'Turn on at least one sign-in method';++ @override+ String authSetFieldRequired(String field) {+ return '$field is required';+ }++ @override+ String authSetInvalidRedirectUri(String uri) {+ return 'Invalid redirect URI: $uri';+ }++ @override+ String get authSetAsteriskAlone =>+ 'An asterisk (*) must be the only redirect URI';++ @override+ String authSetInvalidClaim(String field) {+ return '$field is not a valid claim name';+ }++ @override+ String authSetIssuerFailed(String error) {+ return 'Couldn\'t read the issuer: $error';+ }+@overrideString get libNoneYet => 'No libraries yet';diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dartindex 8ba9d93e..785721d3 100644--- a/lib/l10n/app_localizations_en.dart+++ b/lib/l10n/app_localizations_en.dart@@ -7927,6 +7927,13 @@ class AppLocalizationsEn extends AppLocalizations {@overrideString get adminServerSettingsSubtitle => 'Scanner, storage and sorting';+ @override+ String get adminAuthentication => 'Authentication';++ @override+ String get adminAuthenticationSubtitle =>+ 'Password and OpenID Connect sign-in';+@overrideString get adminStats => 'Statistics';@@ -8069,6 +8076,162 @@ class AppLocalizationsEn extends AppLocalizations {@overrideString get srvPrefixesSaved => 'Sorting prefixes updated';+ @override+ String get authSetLoadFailed => 'Couldn\'t load authentication settings';++ @override+ String get authSetCustomMessage => 'Custom message on login';++ @override+ String get authSetMessage => 'Message';++ @override+ String get authSetPasswordAuth => 'Password authentication';++ @override+ String get authSetOpenId => 'OpenID Connect authentication';++ @override+ String get authSetGuide => 'Setup guide';++ @override+ String get authSetIssuerUrl => 'Issuer URL';++ @override+ String get authSetAutoPopulate => 'Auto-populate';++ @override+ String get authSetAuthorizeUrl => 'Authorize URL';++ @override+ String get authSetTokenUrl => 'Token URL';++ @override+ String get authSetUserinfoUrl => 'Userinfo URL';++ @override+ String get authSetJwksUrl => 'JWKS URL';++ @override+ String get authSetLogoutUrl => 'Logout URL';++ @override+ String get authSetClientId => 'Client ID';++ @override+ String get authSetClientSecret => 'Client secret';++ @override+ String get authSetSigningAlgorithm => 'Signing algorithm';++ @override+ String get authSetRedirectUris => 'Allowed mobile redirect URIs';++ @override+ String get authSetRedirectUrisInfo =>+ 'Apps can only return to these addresses after sign-in. Absorb uses absorb://oauth. An asterisk (*) as the only entry allows any address.';++ @override+ String get authSetAddRedirectUri => 'Add URI';++ @override+ String get authSetAddAbsorbRedirect => 'Add absorb://oauth';++ @override+ String get authSetSubfolder => 'Subfolder for redirect URLs';++ @override+ String get authSetSubfolderNone => 'None';++ @override+ String get authSetWebRedirectInfo =>+ 'Allow these URLs in your OAuth provider so sign-in can return to the web app:';++ @override+ String get authSetButtonText => 'Button text';++ @override+ String get authSetMatchExisting => 'Match existing users by';++ @override+ String get authSetMatchNone => 'Do not match';++ @override+ String get authSetMatchEmail => 'Email';++ @override+ String get authSetMatchUsername => 'Username';++ @override+ String get authSetMatchExistingInfo =>+ 'Used to link existing users. Once linked, users are matched by their unique ID from the provider.';++ @override+ String get authSetAutoLaunch => 'Auto launch';++ @override+ String get authSetAutoLaunchInfo =>+ 'Open the provider automatically from the web login page. /login?autoLaunch=0 skips it.';++ @override+ String get authSetAutoRegister => 'Auto register';++ @override+ String get authSetAutoRegisterInfo =>+ 'Create new users automatically after they sign in';++ @override+ String get authSetClaimsInfo =>+ 'Leave these empty to turn off group and permission assignment. New users then get the User role.';++ @override+ String get authSetGroupClaim => 'Group claim';++ @override+ String get authSetGroupClaimInfo =>+ 'Claim that lists the user\'s groups, usually groups. Groups named admin, user or guest set the role, and the highest one wins. If no group matches, sign-in is refused.';++ @override+ String get authSetPermsClaim => 'Advanced permission claim';++ @override+ String get authSetPermsClaimInfo =>+ 'Claim with permissions for non-admin users. If the claim is missing, sign-in is refused, and a missing option counts as off. Expected format:';++ @override+ String get authSetRestartNote =>+ 'Restart the server after saving to apply OpenID Connect changes.';++ @override+ String get authSetNoChanges => 'No changes to save';++ @override+ String get authSetNeedOneMethod => 'Turn on at least one sign-in method';++ @override+ String authSetFieldRequired(String field) {+ return '$field is required';+ }++ @override+ String authSetInvalidRedirectUri(String uri) {+ return 'Invalid redirect URI: $uri';+ }++ @override+ String get authSetAsteriskAlone =>+ 'An asterisk (*) must be the only redirect URI';++ @override+ String authSetInvalidClaim(String field) {+ return '$field is not a valid claim name';+ }++ @override+ String authSetIssuerFailed(String error) {+ return 'Couldn\'t read the issuer: $error';+ }+@overrideString get libNoneYet => 'No libraries yet';diff --git a/lib/l10n/app_localizations_es.dart b/lib/l10n/app_localizations_es.dartindex bbe0dfa8..464ba077 100644--- a/lib/l10n/app_localizations_es.dart+++ b/lib/l10n/app_localizations_es.dart@@ -7929,6 +7929,13 @@ class AppLocalizationsEs extends AppLocalizations {@overrideString get adminServerSettingsSubtitle => 'Scanner, storage and sorting';+ @override+ String get adminAuthentication => 'Authentication';++ @override+ String get adminAuthenticationSubtitle =>+ 'Password and OpenID Connect sign-in';+@overrideString get adminStats => 'Statistics';@@ -8071,6 +8078,162 @@ class AppLocalizationsEs extends AppLocalizations {@overrideString get srvPrefixesSaved => 'Sorting prefixes updated';+ @override+ String get authSetLoadFailed => 'Couldn\'t load authentication settings';++ @override+ String get authSetCustomMessage => 'Custom message on login';++ @override+ String get authSetMessage => 'Message';++ @override+ String get authSetPasswordAuth => 'Password authentication';++ @override+ String get authSetOpenId => 'OpenID Connect authentication';++ @override+ String get authSetGuide => 'Setup guide';++ @override+ String get authSetIssuerUrl => 'Issuer URL';++ @override+ String get authSetAutoPopulate => 'Auto-populate';++ @override+ String get authSetAuthorizeUrl => 'Authorize URL';++ @override+ String get authSetTokenUrl => 'Token URL';++ @override+ String get authSetUserinfoUrl => 'Userinfo URL';++ @override+ String get authSetJwksUrl => 'JWKS URL';++ @override+ String get authSetLogoutUrl => 'Logout URL';++ @override+ String get authSetClientId => 'Client ID';++ @override+ String get authSetClientSecret => 'Client secret';++ @override+ String get authSetSigningAlgorithm => 'Signing algorithm';++ @override+ String get authSetRedirectUris => 'Allowed mobile redirect URIs';++ @override+ String get authSetRedirectUrisInfo =>+ 'Apps can only return to these addresses after sign-in. Absorb uses absorb://oauth. An asterisk (*) as the only entry allows any address.';++ @override+ String get authSetAddRedirectUri => 'Add URI';++ @override+ String get authSetAddAbsorbRedirect => 'Add absorb://oauth';++ @override+ String get authSetSubfolder => 'Subfolder for redirect URLs';++ @override+ String get authSetSubfolderNone => 'None';++ @override+ String get authSetWebRedirectInfo =>+ 'Allow these URLs in your OAuth provider so sign-in can return to the web app:';++ @override+ String get authSetButtonText => 'Button text';++ @override+ String get authSetMatchExisting => 'Match existing users by';++ @override+ String get authSetMatchNone => 'Do not match';++ @override+ String get authSetMatchEmail => 'Email';++ @override+ String get authSetMatchUsername => 'Username';++ @override+ String get authSetMatchExistingInfo =>+ 'Used to link existing users. Once linked, users are matched by their unique ID from the provider.';++ @override+ String get authSetAutoLaunch => 'Auto launch';++ @override+ String get authSetAutoLaunchInfo =>+ 'Open the provider automatically from the web login page. /login?autoLaunch=0 skips it.';++ @override+ String get authSetAutoRegister => 'Auto register';++ @override+ String get authSetAutoRegisterInfo =>+ 'Create new users automatically after they sign in';++ @override+ String get authSetClaimsInfo =>+ 'Leave these empty to turn off group and permission assignment. New users then get the User role.';++ @override+ String get authSetGroupClaim => 'Group claim';++ @override+ String get authSetGroupClaimInfo =>+ 'Claim that lists the user\'s groups, usually groups. Groups named admin, user or guest set the role, and the highest one wins. If no group matches, sign-in is refused.';++ @override+ String get authSetPermsClaim => 'Advanced permission claim';++ @override+ String get authSetPermsClaimInfo =>+ 'Claim with permissions for non-admin users. If the claim is missing, sign-in is refused, and a missing option counts as off. Expected format:';++ @override+ String get authSetRestartNote =>+ 'Restart the server after saving to apply OpenID Connect changes.';++ @override+ String get authSetNoChanges => 'No changes to save';++ @override+ String get authSetNeedOneMethod => 'Turn on at least one sign-in method';++ @override+ String authSetFieldRequired(String field) {+ return '$field is required';+ }++ @override+ String authSetInvalidRedirectUri(String uri) {+ return 'Invalid redirect URI: $uri';+ }++ @override+ String get authSetAsteriskAlone =>+ 'An asterisk (*) must be the only redirect URI';++ @override+ String authSetInvalidClaim(String field) {+ return '$field is not a valid claim name';+ }++ @override+ String authSetIssuerFailed(String error) {+ return 'Couldn\'t read the issuer: $error';+ }+@overrideString get libNoneYet => 'No libraries yet';diff --git a/lib/l10n/app_localizations_fr.dart b/lib/l10n/app_localizations_fr.dartindex 1248f1d7..1d53b454 100644--- a/lib/l10n/app_localizations_fr.dart+++ b/lib/l10n/app_localizations_fr.dart@@ -7978,6 +7978,13 @@ class AppLocalizationsFr extends AppLocalizations {@overrideString get adminServerSettingsSubtitle => 'Scanner, storage and sorting';+ @override+ String get adminAuthentication => 'Authentication';++ @override+ String get adminAuthenticationSubtitle =>+ 'Password and OpenID Connect sign-in';+@overrideString get adminStats => 'Statistiques';@@ -8120,6 +8127,162 @@ class AppLocalizationsFr extends AppLocalizations {@overrideString get srvPrefixesSaved => 'Sorting prefixes updated';+ @override+ String get authSetLoadFailed => 'Couldn\'t load authentication settings';++ @override+ String get authSetCustomMessage => 'Custom message on login';++ @override+ String get authSetMessage => 'Message';++ @override+ String get authSetPasswordAuth => 'Password authentication';++ @override+ String get authSetOpenId => 'OpenID Connect authentication';++ @override+ String get authSetGuide => 'Setup guide';++ @override+ String get authSetIssuerUrl => 'Issuer URL';++ @override+ String get authSetAutoPopulate => 'Auto-populate';++ @override+ String get authSetAuthorizeUrl => 'Authorize URL';++ @override+ String get authSetTokenUrl => 'Token URL';++ @override+ String get authSetUserinfoUrl => 'Userinfo URL';++ @override+ String get authSetJwksUrl => 'JWKS URL';++ @override+ String get authSetLogoutUrl => 'Logout URL';++ @override+ String get authSetClientId => 'Client ID';++ @override+ String get authSetClientSecret => 'Client secret';++ @override+ String get authSetSigningAlgorithm => 'Signing algorithm';++ @override+ String get authSetRedirectUris => 'Allowed mobile redirect URIs';++ @override+ String get authSetRedirectUrisInfo =>+ 'Apps can only return to these addresses after sign-in. Absorb uses absorb://oauth. An asterisk (*) as the only entry allows any address.';++ @override+ String get authSetAddRedirectUri => 'Add URI';++ @override+ String get authSetAddAbsorbRedirect => 'Add absorb://oauth';++ @override+ String get authSetSubfolder => 'Subfolder for redirect URLs';++ @override+ String get authSetSubfolderNone => 'None';++ @override+ String get authSetWebRedirectInfo =>+ 'Allow these URLs in your OAuth provider so sign-in can return to the web app:';++ @override+ String get authSetButtonText => 'Button text';++ @override+ String get authSetMatchExisting => 'Match existing users by';++ @override+ String get authSetMatchNone => 'Do not match';++ @override+ String get authSetMatchEmail => 'Email';++ @override+ String get authSetMatchUsername => 'Username';++ @override+ String get authSetMatchExistingInfo =>+ 'Used to link existing users. Once linked, users are matched by their unique ID from the provider.';++ @override+ String get authSetAutoLaunch => 'Auto launch';++ @override+ String get authSetAutoLaunchInfo =>+ 'Open the provider automatically from the web login page. /login?autoLaunch=0 skips it.';++ @override+ String get authSetAutoRegister => 'Auto register';++ @override+ String get authSetAutoRegisterInfo =>+ 'Create new users automatically after they sign in';++ @override+ String get authSetClaimsInfo =>+ 'Leave these empty to turn off group and permission assignment. New users then get the User role.';++ @override+ String get authSetGroupClaim => 'Group claim';++ @override+ String get authSetGroupClaimInfo =>+ 'Claim that lists the user\'s groups, usually groups. Groups named admin, user or guest set the role, and the highest one wins. If no group matches, sign-in is refused.';++ @override+ String get authSetPermsClaim => 'Advanced permission claim';++ @override+ String get authSetPermsClaimInfo =>+ 'Claim with permissions for non-admin users. If the claim is missing, sign-in is refused, and a missing option counts as off. Expected format:';++ @override+ String get authSetRestartNote =>+ 'Restart the server after saving to apply OpenID Connect changes.';++ @override+ String get authSetNoChanges => 'No changes to save';++ @override+ String get authSetNeedOneMethod => 'Turn on at least one sign-in method';++ @override+ String authSetFieldRequired(String field) {+ return '$field is required';+ }++ @override+ String authSetInvalidRedirectUri(String uri) {+ return 'Invalid redirect URI: $uri';+ }++ @override+ String get authSetAsteriskAlone =>+ 'An asterisk (*) must be the only redirect URI';++ @override+ String authSetInvalidClaim(String field) {+ return '$field is not a valid claim name';+ }++ @override+ String authSetIssuerFailed(String error) {+ return 'Couldn\'t read the issuer: $error';+ }+@overrideString get libNoneYet => 'Pas encore de bibliothèques';diff --git a/lib/l10n/app_localizations_it.dart b/lib/l10n/app_localizations_it.dartindex 550888fe..4021bf74 100644--- a/lib/l10n/app_localizations_it.dart+++ b/lib/l10n/app_localizations_it.dart@@ -7927,6 +7927,13 @@ class AppLocalizationsIt extends AppLocalizations {@overrideString get adminServerSettingsSubtitle => 'Scanner, storage and sorting';+ @override+ String get adminAuthentication => 'Authentication';++ @override+ String get adminAuthenticationSubtitle =>+ 'Password and OpenID Connect sign-in';+@overrideString get adminStats => 'Statistics';@@ -8069,6 +8076,162 @@ class AppLocalizationsIt extends AppLocalizations {@overrideString get srvPrefixesSaved => 'Sorting prefixes updated';+ @override+ String get authSetLoadFailed => 'Couldn\'t load authentication settings';++ @override+ String get authSetCustomMessage => 'Custom message on login';++ @override+ String get authSetMessage => 'Message';++ @override+ String get authSetPasswordAuth => 'Password authentication';++ @override+ String get authSetOpenId => 'OpenID Connect authentication';++ @override+ String get authSetGuide => 'Setup guide';++ @override+ String get authSetIssuerUrl => 'Issuer URL';++ @override+ String get authSetAutoPopulate => 'Auto-populate';++ @override+ String get authSetAuthorizeUrl => 'Authorize URL';++ @override+ String get authSetTokenUrl => 'Token URL';++ @override+ String get authSetUserinfoUrl => 'Userinfo URL';++ @override+ String get authSetJwksUrl => 'JWKS URL';++ @override+ String get authSetLogoutUrl => 'Logout URL';++ @override+ String get authSetClientId => 'Client ID';++ @override+ String get authSetClientSecret => 'Client secret';++ @override+ String get authSetSigningAlgorithm => 'Signing algorithm';++ @override+ String get authSetRedirectUris => 'Allowed mobile redirect URIs';++ @override+ String get authSetRedirectUrisInfo =>+ 'Apps can only return to these addresses after sign-in. Absorb uses absorb://oauth. An asterisk (*) as the only entry allows any address.';++ @override+ String get authSetAddRedirectUri => 'Add URI';++ @override+ String get authSetAddAbsorbRedirect => 'Add absorb://oauth';++ @override+ String get authSetSubfolder => 'Subfolder for redirect URLs';++ @override+ String get authSetSubfolderNone => 'None';++ @override+ String get authSetWebRedirectInfo =>+ 'Allow these URLs in your OAuth provider so sign-in can return to the web app:';++ @override+ String get authSetButtonText => 'Button text';++ @override+ String get authSetMatchExisting => 'Match existing users by';++ @override+ String get authSetMatchNone => 'Do not match';++ @override+ String get authSetMatchEmail => 'Email';++ @override+ String get authSetMatchUsername => 'Username';++ @override+ String get authSetMatchExistingInfo =>+ 'Used to link existing users. Once linked, users are matched by their unique ID from the provider.';++ @override+ String get authSetAutoLaunch => 'Auto launch';++ @override+ String get authSetAutoLaunchInfo =>+ 'Open the provider automatically from the web login page. /login?autoLaunch=0 skips it.';++ @override+ String get authSetAutoRegister => 'Auto register';++ @override+ String get authSetAutoRegisterInfo =>+ 'Create new users automatically after they sign in';++ @override+ String get authSetClaimsInfo =>+ 'Leave these empty to turn off group and permission assignment. New users then get the User role.';++ @override+ String get authSetGroupClaim => 'Group claim';++ @override+ String get authSetGroupClaimInfo =>+ 'Claim that lists the user\'s groups, usually groups. Groups named admin, user or guest set the role, and the highest one wins. If no group matches, sign-in is refused.';++ @override+ String get authSetPermsClaim => 'Advanced permission claim';++ @override+ String get authSetPermsClaimInfo =>+ 'Claim with permissions for non-admin users. If the claim is missing, sign-in is refused, and a missing option counts as off. Expected format:';++ @override+ String get authSetRestartNote =>+ 'Restart the server after saving to apply OpenID Connect changes.';++ @override+ String get authSetNoChanges => 'No changes to save';++ @override+ String get authSetNeedOneMethod => 'Turn on at least one sign-in method';++ @override+ String authSetFieldRequired(String field) {+ return '$field is required';+ }++ @override+ String authSetInvalidRedirectUri(String uri) {+ return 'Invalid redirect URI: $uri';+ }++ @override+ String get authSetAsteriskAlone =>+ 'An asterisk (*) must be the only redirect URI';++ @override+ String authSetInvalidClaim(String field) {+ return '$field is not a valid claim name';+ }++ @override+ String authSetIssuerFailed(String error) {+ return 'Couldn\'t read the issuer: $error';+ }+@overrideString get libNoneYet => 'No libraries yet';diff --git a/lib/l10n/app_localizations_ja.dart b/lib/l10n/app_localizations_ja.dartindex 690b17ef..600d3595 100644--- a/lib/l10n/app_localizations_ja.dart+++ b/lib/l10n/app_localizations_ja.dart@@ -7927,6 +7927,13 @@ class AppLocalizationsJa extends AppLocalizations {@overrideString get adminServerSettingsSubtitle => 'Scanner, storage and sorting';+ @override+ String get adminAuthentication => 'Authentication';++ @override+ String get adminAuthenticationSubtitle =>+ 'Password and OpenID Connect sign-in';+@overrideString get adminStats => 'Statistics';@@ -8069,6 +8076,162 @@ class AppLocalizationsJa extends AppLocalizations {@overrideString get srvPrefixesSaved => 'Sorting prefixes updated';+ @override+ String get authSetLoadFailed => 'Couldn\'t load authentication settings';++ @override+ String get authSetCustomMessage => 'Custom message on login';++ @override+ String get authSetMessage => 'Message';++ @override+ String get authSetPasswordAuth => 'Password authentication';++ @override+ String get authSetOpenId => 'OpenID Connect authentication';++ @override+ String get authSetGuide => 'Setup guide';++ @override+ String get authSetIssuerUrl => 'Issuer URL';++ @override+ String get authSetAutoPopulate => 'Auto-populate';++ @override+ String get authSetAuthorizeUrl => 'Authorize URL';++ @override+ String get authSetTokenUrl => 'Token URL';++ @override+ String get authSetUserinfoUrl => 'Userinfo URL';++ @override+ String get authSetJwksUrl => 'JWKS URL';++ @override+ String get authSetLogoutUrl => 'Logout URL';++ @override+ String get authSetClientId => 'Client ID';++ @override+ String get authSetClientSecret => 'Client secret';++ @override+ String get authSetSigningAlgorithm => 'Signing algorithm';++ @override+ String get authSetRedirectUris => 'Allowed mobile redirect URIs';++ @override+ String get authSetRedirectUrisInfo =>+ 'Apps can only return to these addresses after sign-in. Absorb uses absorb://oauth. An asterisk (*) as the only entry allows any address.';++ @override+ String get authSetAddRedirectUri => 'Add URI';++ @override+ String get authSetAddAbsorbRedirect => 'Add absorb://oauth';++ @override+ String get authSetSubfolder => 'Subfolder for redirect URLs';++ @override+ String get authSetSubfolderNone => 'None';++ @override+ String get authSetWebRedirectInfo =>+ 'Allow these URLs in your OAuth provider so sign-in can return to the web app:';++ @override+ String get authSetButtonText => 'Button text';++ @override+ String get authSetMatchExisting => 'Match existing users by';++ @override+ String get authSetMatchNone => 'Do not match';++ @override+ String get authSetMatchEmail => 'Email';++ @override+ String get authSetMatchUsername => 'Username';++ @override+ String get authSetMatchExistingInfo =>+ 'Used to link existing users. Once linked, users are matched by their unique ID from the provider.';++ @override+ String get authSetAutoLaunch => 'Auto launch';++ @override+ String get authSetAutoLaunchInfo =>+ 'Open the provider automatically from the web login page. /login?autoLaunch=0 skips it.';++ @override+ String get authSetAutoRegister => 'Auto register';++ @override+ String get authSetAutoRegisterInfo =>+ 'Create new users automatically after they sign in';++ @override+ String get authSetClaimsInfo =>+ 'Leave these empty to turn off group and permission assignment. New users then get the User role.';++ @override+ String get authSetGroupClaim => 'Group claim';++ @override+ String get authSetGroupClaimInfo =>+ 'Claim that lists the user\'s groups, usually groups. Groups named admin, user or guest set the role, and the highest one wins. If no group matches, sign-in is refused.';++ @override+ String get authSetPermsClaim => 'Advanced permission claim';++ @override+ String get authSetPermsClaimInfo =>+ 'Claim with permissions for non-admin users. If the claim is missing, sign-in is refused, and a missing option counts as off. Expected format:';++ @override+ String get authSetRestartNote =>+ 'Restart the server after saving to apply OpenID Connect changes.';++ @override+ String get authSetNoChanges => 'No changes to save';++ @override+ String get authSetNeedOneMethod => 'Turn on at least one sign-in method';++ @override+ String authSetFieldRequired(String field) {+ return '$field is required';+ }++ @override+ String authSetInvalidRedirectUri(String uri) {+ return 'Invalid redirect URI: $uri';+ }++ @override+ String get authSetAsteriskAlone =>+ 'An asterisk (*) must be the only redirect URI';++ @override+ String authSetInvalidClaim(String field) {+ return '$field is not a valid claim name';+ }++ @override+ String authSetIssuerFailed(String error) {+ return 'Couldn\'t read the issuer: $error';+ }+@overrideString get libNoneYet => 'No libraries yet';diff --git a/lib/l10n/app_localizations_no.dart b/lib/l10n/app_localizations_no.dartindex e19e21c8..3017fb3b 100644--- a/lib/l10n/app_localizations_no.dart+++ b/lib/l10n/app_localizations_no.dart@@ -7927,6 +7927,13 @@ class AppLocalizationsNo extends AppLocalizations {@overrideString get adminServerSettingsSubtitle => 'Scanner, storage and sorting';+ @override+ String get adminAuthentication => 'Authentication';++ @override+ String get adminAuthenticationSubtitle =>+ 'Password and OpenID Connect sign-in';+@overrideString get adminStats => 'Statistics';@@ -8069,6 +8076,162 @@ class AppLocalizationsNo extends AppLocalizations {@overrideString get srvPrefixesSaved => 'Sorting prefixes updated';+ @override+ String get authSetLoadFailed => 'Couldn\'t load authentication settings';++ @override+ String get authSetCustomMessage => 'Custom message on login';++ @override+ String get authSetMessage => 'Message';++ @override+ String get authSetPasswordAuth => 'Password authentication';++ @override+ String get authSetOpenId => 'OpenID Connect authentication';++ @override+ String get authSetGuide => 'Setup guide';++ @override+ String get authSetIssuerUrl => 'Issuer URL';++ @override+ String get authSetAutoPopulate => 'Auto-populate';++ @override+ String get authSetAuthorizeUrl => 'Authorize URL';++ @override+ String get authSetTokenUrl => 'Token URL';++ @override+ String get authSetUserinfoUrl => 'Userinfo URL';++ @override+ String get authSetJwksUrl => 'JWKS URL';++ @override+ String get authSetLogoutUrl => 'Logout URL';++ @override+ String get authSetClientId => 'Client ID';++ @override+ String get authSetClientSecret => 'Client secret';++ @override+ String get authSetSigningAlgorithm => 'Signing algorithm';++ @override+ String get authSetRedirectUris => 'Allowed mobile redirect URIs';++ @override+ String get authSetRedirectUrisInfo =>+ 'Apps can only return to these addresses after sign-in. Absorb uses absorb://oauth. An asterisk (*) as the only entry allows any address.';++ @override+ String get authSetAddRedirectUri => 'Add URI';++ @override+ String get authSetAddAbsorbRedirect => 'Add absorb://oauth';++ @override+ String get authSetSubfolder => 'Subfolder for redirect URLs';++ @override+ String get authSetSubfolderNone => 'None';++ @override+ String get authSetWebRedirectInfo =>+ 'Allow these URLs in your OAuth provider so sign-in can return to the web app:';++ @override+ String get authSetButtonText => 'Button text';++ @override+ String get authSetMatchExisting => 'Match existing users by';++ @override+ String get authSetMatchNone => 'Do not match';++ @override+ String get authSetMatchEmail => 'Email';++ @override+ String get authSetMatchUsername => 'Username';++ @override+ String get authSetMatchExistingInfo =>+ 'Used to link existing users. Once linked, users are matched by their unique ID from the provider.';++ @override+ String get authSetAutoLaunch => 'Auto launch';++ @override+ String get authSetAutoLaunchInfo =>+ 'Open the provider automatically from the web login page. /login?autoLaunch=0 skips it.';++ @override+ String get authSetAutoRegister => 'Auto register';++ @override+ String get authSetAutoRegisterInfo =>+ 'Create new users automatically after they sign in';++ @override+ String get authSetClaimsInfo =>+ 'Leave these empty to turn off group and permission assignment. New users then get the User role.';++ @override+ String get authSetGroupClaim => 'Group claim';++ @override+ String get authSetGroupClaimInfo =>+ 'Claim that lists the user\'s groups, usually groups. Groups named admin, user or guest set the role, and the highest one wins. If no group matches, sign-in is refused.';++ @override+ String get authSetPermsClaim => 'Advanced permission claim';++ @override+ String get authSetPermsClaimInfo =>+ 'Claim with permissions for non-admin users. If the claim is missing, sign-in is refused, and a missing option counts as off. Expected format:';++ @override+ String get authSetRestartNote =>+ 'Restart the server after saving to apply OpenID Connect changes.';++ @override+ String get authSetNoChanges => 'No changes to save';++ @override+ String get authSetNeedOneMethod => 'Turn on at least one sign-in method';++ @override+ String authSetFieldRequired(String field) {+ return '$field is required';+ }++ @override+ String authSetInvalidRedirectUri(String uri) {+ return 'Invalid redirect URI: $uri';+ }++ @override+ String get authSetAsteriskAlone =>+ 'An asterisk (*) must be the only redirect URI';++ @override+ String authSetInvalidClaim(String field) {+ return '$field is not a valid claim name';+ }++ @override+ String authSetIssuerFailed(String error) {+ return 'Couldn\'t read the issuer: $error';+ }+@overrideString get libNoneYet => 'No libraries yet';diff --git a/lib/l10n/app_localizations_pt.dart b/lib/l10n/app_localizations_pt.dartindex 370adb03..720fbf17 100644--- a/lib/l10n/app_localizations_pt.dart+++ b/lib/l10n/app_localizations_pt.dart@@ -7927,6 +7927,13 @@ class AppLocalizationsPt extends AppLocalizations {@overrideString get adminServerSettingsSubtitle => 'Scanner, storage and sorting';+ @override+ String get adminAuthentication => 'Authentication';++ @override+ String get adminAuthenticationSubtitle =>+ 'Password and OpenID Connect sign-in';+@overrideString get adminStats => 'Statistics';@@ -8069,6 +8076,162 @@ class AppLocalizationsPt extends AppLocalizations {@overrideString get srvPrefixesSaved => 'Sorting prefixes updated';+ @override+ String get authSetLoadFailed => 'Couldn\'t load authentication settings';++ @override+ String get authSetCustomMessage => 'Custom message on login';++ @override+ String get authSetMessage => 'Message';++ @override+ String get authSetPasswordAuth => 'Password authentication';++ @override+ String get authSetOpenId => 'OpenID Connect authentication';++ @override+ String get authSetGuide => 'Setup guide';++ @override+ String get authSetIssuerUrl => 'Issuer URL';++ @override+ String get authSetAutoPopulate => 'Auto-populate';++ @override+ String get authSetAuthorizeUrl => 'Authorize URL';++ @override+ String get authSetTokenUrl => 'Token URL';++ @override+ String get authSetUserinfoUrl => 'Userinfo URL';++ @override+ String get authSetJwksUrl => 'JWKS URL';++ @override+ String get authSetLogoutUrl => 'Logout URL';++ @override+ String get authSetClientId => 'Client ID';++ @override+ String get authSetClientSecret => 'Client secret';++ @override+ String get authSetSigningAlgorithm => 'Signing algorithm';++ @override+ String get authSetRedirectUris => 'Allowed mobile redirect URIs';++ @override+ String get authSetRedirectUrisInfo =>+ 'Apps can only return to these addresses after sign-in. Absorb uses absorb://oauth. An asterisk (*) as the only entry allows any address.';++ @override+ String get authSetAddRedirectUri => 'Add URI';++ @override+ String get authSetAddAbsorbRedirect => 'Add absorb://oauth';++ @override+ String get authSetSubfolder => 'Subfolder for redirect URLs';++ @override+ String get authSetSubfolderNone => 'None';++ @override+ String get authSetWebRedirectInfo =>+ 'Allow these URLs in your OAuth provider so sign-in can return to the web app:';++ @override+ String get authSetButtonText => 'Button text';++ @override+ String get authSetMatchExisting => 'Match existing users by';++ @override+ String get authSetMatchNone => 'Do not match';++ @override+ String get authSetMatchEmail => 'Email';++ @override+ String get authSetMatchUsername => 'Username';++ @override+ String get authSetMatchExistingInfo =>+ 'Used to link existing users. Once linked, users are matched by their unique ID from the provider.';++ @override+ String get authSetAutoLaunch => 'Auto launch';++ @override+ String get authSetAutoLaunchInfo =>+ 'Open the provider automatically from the web login page. /login?autoLaunch=0 skips it.';++ @override+ String get authSetAutoRegister => 'Auto register';++ @override+ String get authSetAutoRegisterInfo =>+ 'Create new users automatically after they sign in';++ @override+ String get authSetClaimsInfo =>+ 'Leave these empty to turn off group and permission assignment. New users then get the User role.';++ @override+ String get authSetGroupClaim => 'Group claim';++ @override+ String get authSetGroupClaimInfo =>+ 'Claim that lists the user\'s groups, usually groups. Groups named admin, user or guest set the role, and the highest one wins. If no group matches, sign-in is refused.';++ @override+ String get authSetPermsClaim => 'Advanced permission claim';++ @override+ String get authSetPermsClaimInfo =>+ 'Claim with permissions for non-admin users. If the claim is missing, sign-in is refused, and a missing option counts as off. Expected format:';++ @override+ String get authSetRestartNote =>+ 'Restart the server after saving to apply OpenID Connect changes.';++ @override+ String get authSetNoChanges => 'No changes to save';++ @override+ String get authSetNeedOneMethod => 'Turn on at least one sign-in method';++ @override+ String authSetFieldRequired(String field) {+ return '$field is required';+ }++ @override+ String authSetInvalidRedirectUri(String uri) {+ return 'Invalid redirect URI: $uri';+ }++ @override+ String get authSetAsteriskAlone =>+ 'An asterisk (*) must be the only redirect URI';++ @override+ String authSetInvalidClaim(String field) {+ return '$field is not a valid claim name';+ }++ @override+ String authSetIssuerFailed(String error) {+ return 'Couldn\'t read the issuer: $error';+ }+@overrideString get libNoneYet => 'No libraries yet';diff --git a/lib/l10n/app_localizations_ro.dart b/lib/l10n/app_localizations_ro.dartindex a858df04..abb0b0db 100644--- a/lib/l10n/app_localizations_ro.dart+++ b/lib/l10n/app_localizations_ro.dart@@ -7927,6 +7927,13 @@ class AppLocalizationsRo extends AppLocalizations {@overrideString get adminServerSettingsSubtitle => 'Scanner, storage and sorting';+ @override+ String get adminAuthentication => 'Authentication';++ @override+ String get adminAuthenticationSubtitle =>+ 'Password and OpenID Connect sign-in';+@overrideString get adminStats => 'Statistics';@@ -8069,6 +8076,162 @@ class AppLocalizationsRo extends AppLocalizations {@overrideString get srvPrefixesSaved => 'Sorting prefixes updated';+ @override+ String get authSetLoadFailed => 'Couldn\'t load authentication settings';++ @override+ String get authSetCustomMessage => 'Custom message on login';++ @override+ String get authSetMessage => 'Message';++ @override+ String get authSetPasswordAuth => 'Password authentication';++ @override+ String get authSetOpenId => 'OpenID Connect authentication';++ @override+ String get authSetGuide => 'Setup guide';++ @override+ String get authSetIssuerUrl => 'Issuer URL';++ @override+ String get authSetAutoPopulate => 'Auto-populate';++ @override+ String get authSetAuthorizeUrl => 'Authorize URL';++ @override+ String get authSetTokenUrl => 'Token URL';++ @override+ String get authSetUserinfoUrl => 'Userinfo URL';++ @override+ String get authSetJwksUrl => 'JWKS URL';++ @override+ String get authSetLogoutUrl => 'Logout URL';++ @override+ String get authSetClientId => 'Client ID';++ @override+ String get authSetClientSecret => 'Client secret';++ @override+ String get authSetSigningAlgorithm => 'Signing algorithm';++ @override+ String get authSetRedirectUris => 'Allowed mobile redirect URIs';++ @override+ String get authSetRedirectUrisInfo =>+ 'Apps can only return to these addresses after sign-in. Absorb uses absorb://oauth. An asterisk (*) as the only entry allows any address.';++ @override+ String get authSetAddRedirectUri => 'Add URI';++ @override+ String get authSetAddAbsorbRedirect => 'Add absorb://oauth';++ @override+ String get authSetSubfolder => 'Subfolder for redirect URLs';++ @override+ String get authSetSubfolderNone => 'None';++ @override+ String get authSetWebRedirectInfo =>+ 'Allow these URLs in your OAuth provider so sign-in can return to the web app:';++ @override+ String get authSetButtonText => 'Button text';++ @override+ String get authSetMatchExisting => 'Match existing users by';++ @override+ String get authSetMatchNone => 'Do not match';++ @override+ String get authSetMatchEmail => 'Email';++ @override+ String get authSetMatchUsername => 'Username';++ @override+ String get authSetMatchExistingInfo =>+ 'Used to link existing users. Once linked, users are matched by their unique ID from the provider.';++ @override+ String get authSetAutoLaunch => 'Auto launch';++ @override+ String get authSetAutoLaunchInfo =>+ 'Open the provider automatically from the web login page. /login?autoLaunch=0 skips it.';++ @override+ String get authSetAutoRegister => 'Auto register';++ @override+ String get authSetAutoRegisterInfo =>+ 'Create new users automatically after they sign in';++ @override+ String get authSetClaimsInfo =>+ 'Leave these empty to turn off group and permission assignment. New users then get the User role.';++ @override+ String get authSetGroupClaim => 'Group claim';++ @override+ String get authSetGroupClaimInfo =>+ 'Claim that lists the user\'s groups, usually groups. Groups named admin, user or guest set the role, and the highest one wins. If no group matches, sign-in is refused.';++ @override+ String get authSetPermsClaim => 'Advanced permission claim';++ @override+ String get authSetPermsClaimInfo =>+ 'Claim with permissions for non-admin users. If the claim is missing, sign-in is refused, and a missing option counts as off. Expected format:';++ @override+ String get authSetRestartNote =>+ 'Restart the server after saving to apply OpenID Connect changes.';++ @override+ String get authSetNoChanges => 'No changes to save';++ @override+ String get authSetNeedOneMethod => 'Turn on at least one sign-in method';++ @override+ String authSetFieldRequired(String field) {+ return '$field is required';+ }++ @override+ String authSetInvalidRedirectUri(String uri) {+ return 'Invalid redirect URI: $uri';+ }++ @override+ String get authSetAsteriskAlone =>+ 'An asterisk (*) must be the only redirect URI';++ @override+ String authSetInvalidClaim(String field) {+ return '$field is not a valid claim name';+ }++ @override+ String authSetIssuerFailed(String error) {+ return 'Couldn\'t read the issuer: $error';+ }+@overrideString get libNoneYet => 'No libraries yet';diff --git a/lib/l10n/app_localizations_ru.dart b/lib/l10n/app_localizations_ru.dartindex b130355a..318f9a2c 100644--- a/lib/l10n/app_localizations_ru.dart+++ b/lib/l10n/app_localizations_ru.dart@@ -7932,6 +7932,13 @@ class AppLocalizationsRu extends AppLocalizations {@overrideString get adminServerSettingsSubtitle => 'Scanner, storage and sorting';+ @override+ String get adminAuthentication => 'Authentication';++ @override+ String get adminAuthenticationSubtitle =>+ 'Password and OpenID Connect sign-in';+@overrideString get adminStats => 'Statistics';@@ -8074,6 +8081,162 @@ class AppLocalizationsRu extends AppLocalizations {@overrideString get srvPrefixesSaved => 'Sorting prefixes updated';+ @override+ String get authSetLoadFailed => 'Couldn\'t load authentication settings';++ @override+ String get authSetCustomMessage => 'Custom message on login';++ @override+ String get authSetMessage => 'Message';++ @override+ String get authSetPasswordAuth => 'Password authentication';++ @override+ String get authSetOpenId => 'OpenID Connect authentication';++ @override+ String get authSetGuide => 'Setup guide';++ @override+ String get authSetIssuerUrl => 'Issuer URL';++ @override+ String get authSetAutoPopulate => 'Auto-populate';++ @override+ String get authSetAuthorizeUrl => 'Authorize URL';++ @override+ String get authSetTokenUrl => 'Token URL';++ @override+ String get authSetUserinfoUrl => 'Userinfo URL';++ @override+ String get authSetJwksUrl => 'JWKS URL';++ @override+ String get authSetLogoutUrl => 'Logout URL';++ @override+ String get authSetClientId => 'Client ID';++ @override+ String get authSetClientSecret => 'Client secret';++ @override+ String get authSetSigningAlgorithm => 'Signing algorithm';++ @override+ String get authSetRedirectUris => 'Allowed mobile redirect URIs';++ @override+ String get authSetRedirectUrisInfo =>+ 'Apps can only return to these addresses after sign-in. Absorb uses absorb://oauth. An asterisk (*) as the only entry allows any address.';++ @override+ String get authSetAddRedirectUri => 'Add URI';++ @override+ String get authSetAddAbsorbRedirect => 'Add absorb://oauth';++ @override+ String get authSetSubfolder => 'Subfolder for redirect URLs';++ @override+ String get authSetSubfolderNone => 'None';++ @override+ String get authSetWebRedirectInfo =>+ 'Allow these URLs in your OAuth provider so sign-in can return to the web app:';++ @override+ String get authSetButtonText => 'Button text';++ @override+ String get authSetMatchExisting => 'Match existing users by';++ @override+ String get authSetMatchNone => 'Do not match';++ @override+ String get authSetMatchEmail => 'Email';++ @override+ String get authSetMatchUsername => 'Username';++ @override+ String get authSetMatchExistingInfo =>+ 'Used to link existing users. Once linked, users are matched by their unique ID from the provider.';++ @override+ String get authSetAutoLaunch => 'Auto launch';++ @override+ String get authSetAutoLaunchInfo =>+ 'Open the provider automatically from the web login page. /login?autoLaunch=0 skips it.';++ @override+ String get authSetAutoRegister => 'Auto register';++ @override+ String get authSetAutoRegisterInfo =>+ 'Create new users automatically after they sign in';++ @override+ String get authSetClaimsInfo =>+ 'Leave these empty to turn off group and permission assignment. New users then get the User role.';++ @override+ String get authSetGroupClaim => 'Group claim';++ @override+ String get authSetGroupClaimInfo =>+ 'Claim that lists the user\'s groups, usually groups. Groups named admin, user or guest set the role, and the highest one wins. If no group matches, sign-in is refused.';++ @override+ String get authSetPermsClaim => 'Advanced permission claim';++ @override+ String get authSetPermsClaimInfo =>+ 'Claim with permissions for non-admin users. If the claim is missing, sign-in is refused, and a missing option counts as off. Expected format:';++ @override+ String get authSetRestartNote =>+ 'Restart the server after saving to apply OpenID Connect changes.';++ @override+ String get authSetNoChanges => 'No changes to save';++ @override+ String get authSetNeedOneMethod => 'Turn on at least one sign-in method';++ @override+ String authSetFieldRequired(String field) {+ return '$field is required';+ }++ @override+ String authSetInvalidRedirectUri(String uri) {+ return 'Invalid redirect URI: $uri';+ }++ @override+ String get authSetAsteriskAlone =>+ 'An asterisk (*) must be the only redirect URI';++ @override+ String authSetInvalidClaim(String field) {+ return '$field is not a valid claim name';+ }++ @override+ String authSetIssuerFailed(String error) {+ return 'Couldn\'t read the issuer: $error';+ }+@overrideString get libNoneYet => 'No libraries yet';diff --git a/lib/l10n/app_localizations_zh.dart b/lib/l10n/app_localizations_zh.dartindex 310187a8..88b4ac17 100644--- a/lib/l10n/app_localizations_zh.dart+++ b/lib/l10n/app_localizations_zh.dart@@ -7835,6 +7835,13 @@ class AppLocalizationsZh extends AppLocalizations {@overrideString get adminServerSettingsSubtitle => 'Scanner, storage and sorting';+ @override+ String get adminAuthentication => 'Authentication';++ @override+ String get adminAuthenticationSubtitle =>+ 'Password and OpenID Connect sign-in';+@overrideString get adminStats => 'Statistics';@@ -7977,6 +7984,162 @@ class AppLocalizationsZh extends AppLocalizations {@overrideString get srvPrefixesSaved => 'Sorting prefixes updated';+ @override+ String get authSetLoadFailed => 'Couldn\'t load authentication settings';++ @override+ String get authSetCustomMessage => 'Custom message on login';++ @override+ String get authSetMessage => 'Message';++ @override+ String get authSetPasswordAuth => 'Password authentication';++ @override+ String get authSetOpenId => 'OpenID Connect authentication';++ @override+ String get authSetGuide => 'Setup guide';++ @override+ String get authSetIssuerUrl => 'Issuer URL';++ @override+ String get authSetAutoPopulate => 'Auto-populate';++ @override+ String get authSetAuthorizeUrl => 'Authorize URL';++ @override+ String get authSetTokenUrl => 'Token URL';++ @override+ String get authSetUserinfoUrl => 'Userinfo URL';++ @override+ String get authSetJwksUrl => 'JWKS URL';++ @override+ String get authSetLogoutUrl => 'Logout URL';++ @override+ String get authSetClientId => 'Client ID';++ @override+ String get authSetClientSecret => 'Client secret';++ @override+ String get authSetSigningAlgorithm => 'Signing algorithm';++ @override+ String get authSetRedirectUris => 'Allowed mobile redirect URIs';++ @override+ String get authSetRedirectUrisInfo =>+ 'Apps can only return to these addresses after sign-in. Absorb uses absorb://oauth. An asterisk (*) as the only entry allows any address.';++ @override+ String get authSetAddRedirectUri => 'Add URI';++ @override+ String get authSetAddAbsorbRedirect => 'Add absorb://oauth';++ @override+ String get authSetSubfolder => 'Subfolder for redirect URLs';++ @override+ String get authSetSubfolderNone => 'None';++ @override+ String get authSetWebRedirectInfo =>+ 'Allow these URLs in your OAuth provider so sign-in can return to the web app:';++ @override+ String get authSetButtonText => 'Button text';++ @override+ String get authSetMatchExisting => 'Match existing users by';++ @override+ String get authSetMatchNone => 'Do not match';++ @override+ String get authSetMatchEmail => 'Email';++ @override+ String get authSetMatchUsername => 'Username';++ @override+ String get authSetMatchExistingInfo =>+ 'Used to link existing users. Once linked, users are matched by their unique ID from the provider.';++ @override+ String get authSetAutoLaunch => 'Auto launch';++ @override+ String get authSetAutoLaunchInfo =>+ 'Open the provider automatically from the web login page. /login?autoLaunch=0 skips it.';++ @override+ String get authSetAutoRegister => 'Auto register';++ @override+ String get authSetAutoRegisterInfo =>+ 'Create new users automatically after they sign in';++ @override+ String get authSetClaimsInfo =>+ 'Leave these empty to turn off group and permission assignment. New users then get the User role.';++ @override+ String get authSetGroupClaim => 'Group claim';++ @override+ String get authSetGroupClaimInfo =>+ 'Claim that lists the user\'s groups, usually groups. Groups named admin, user or guest set the role, and the highest one wins. If no group matches, sign-in is refused.';++ @override+ String get authSetPermsClaim => 'Advanced permission claim';++ @override+ String get authSetPermsClaimInfo =>+ 'Claim with permissions for non-admin users. If the claim is missing, sign-in is refused, and a missing option counts as off. Expected format:';++ @override+ String get authSetRestartNote =>+ 'Restart the server after saving to apply OpenID Connect changes.';++ @override+ String get authSetNoChanges => 'No changes to save';++ @override+ String get authSetNeedOneMethod => 'Turn on at least one sign-in method';++ @override+ String authSetFieldRequired(String field) {+ return '$field is required';+ }++ @override+ String authSetInvalidRedirectUri(String uri) {+ return 'Invalid redirect URI: $uri';+ }++ @override+ String get authSetAsteriskAlone =>+ 'An asterisk (*) must be the only redirect URI';++ @override+ String authSetInvalidClaim(String field) {+ return '$field is not a valid claim name';+ }++ @override+ String authSetIssuerFailed(String error) {+ return 'Couldn\'t read the issuer: $error';+ }+@overrideString get libNoneYet => 'No libraries yet';diff --git a/lib/screens/admin_auth_settings_screen.dart b/lib/screens/admin_auth_settings_screen.dartnew file mode 100644index 00000000..767dda17--- /dev/null+++ b/lib/screens/admin_auth_settings_screen.dart@@ -0,0 +1,547 @@+import 'package:flutter/material.dart';+import 'package:provider/provider.dart';+import 'package:url_launcher/url_launcher.dart';++import '../l10n/app_localizations.dart';+import '../providers/auth_provider.dart';+import '../widgets/absorb_page_header.dart';+import '../widgets/overlay_toast.dart';++/// Password and OpenID Connect sign-in settings, the same fields as the web's+/// Settings > Authentication page. Read with GET /api/auth-settings and saved+/// with PATCH /api/auth-settings.+class AdminAuthSettingsScreen extends StatefulWidget {+ const AdminAuthSettingsScreen({super.key});++ @override+ State<AdminAuthSettingsScreen> createState() => _AdminAuthSettingsScreenState();+}++class _AdminAuthSettingsScreenState extends State<AdminAuthSettingsScreen> {+ // The server's default ROUTER_BASE_PATH. The real one isn't exposed to apps.+ static const _defaultSubfolder = '/audiobookshelf';+ static const _absorbRedirect = 'absorb://oauth';+ static const _guideUrl =+ 'https://audiobookshelf.org/docs/documentation/server-management/oidc-authentication';+ // Same checks the server and the web page apply.+ static final _redirectPattern = RegExp(r'^\w+://[\w.-]+(/[\w./-]*)*$', caseSensitive: false);+ static final _claimPattern = RegExp(r'^[a-zA-Z][a-zA-Z0-9_-]*$');++ Map<String, dynamic>? _settings;+ bool _loading = true;+ bool _saving = false;+ bool _populating = false;++ bool _showMessage = false;+ bool _localAuth = true;+ bool _openId = false;+ bool _autoLaunch = false;+ bool _autoRegister = false;+ bool _showSecret = false;+ // '' = do not match.+ String _matchExistingBy = '';+ String _subfolder = _defaultSubfolder;+ // A server that never saved a subfolder works out its own from the base+ // path, so only send one once it is set or picked here.+ bool _sendSubfolder = false;+ List<String> _redirectUris = [];+ List<String> _algorithms = [];++ final _message = TextEditingController();+ final _issuer = TextEditingController();+ final _authorizeUrl = TextEditingController();+ final _tokenUrl = TextEditingController();+ final _userInfoUrl = TextEditingController();+ final _jwksUrl = TextEditingController();+ final _logoutUrl = TextEditingController();+ final _clientId = TextEditingController();+ final _clientSecret = TextEditingController();+ final _signingAlgorithm = TextEditingController();+ final _buttonText = TextEditingController();+ final _groupClaim = TextEditingController();+ final _permsClaim = TextEditingController();+ final _newRedirect = TextEditingController();++ @override+ void initState() {+ super.initState();+ _load();+ }++ @override+ void dispose() {+ for (final c in [+ _message, _issuer, _authorizeUrl, _tokenUrl, _userInfoUrl, _jwksUrl,+ _logoutUrl, _clientId, _clientSecret, _signingAlgorithm, _buttonText,+ _groupClaim, _permsClaim, _newRedirect,+ ]) {+ c.dispose();+ }+ super.dispose();+ }++ Future<void> _load() async {+ final api = context.read<AuthProvider>().apiService;+ setState(() => _loading = true);+ final s = await api?.getAuthSettings();+ if (!mounted) return;+ setState(() {+ _loading = false;+ _settings = s;+ if (s != null) _apply(s);+ });+ }++ void _apply(Map<String, dynamic> s) {+ String text(String key) => s[key]?.toString() ?? '';+ final methods = ((s['authActiveAuthMethods'] as List?) ?? const ['local']).map((e) => '$e').toList();+ _localAuth = methods.contains('local');+ _openId = methods.contains('openid');+ _message.text = text('authLoginCustomMessage');+ _showMessage = _message.text.trim().isNotEmpty;+ _issuer.text = text('authOpenIDIssuerURL');+ _authorizeUrl.text = text('authOpenIDAuthorizationURL');+ _tokenUrl.text = text('authOpenIDTokenURL');+ _userInfoUrl.text = text('authOpenIDUserInfoURL');+ _jwksUrl.text = text('authOpenIDJwksURL');+ _logoutUrl.text = text('authOpenIDLogoutURL');+ _clientId.text = text('authOpenIDClientID');+ _clientSecret.text = text('authOpenIDClientSecret');+ _signingAlgorithm.text = text('authOpenIDTokenSigningAlgorithm');+ _buttonText.text = text('authOpenIDButtonText');+ _autoLaunch = s['authOpenIDAutoLaunch'] == true;+ _autoRegister = s['authOpenIDAutoRegister'] == true;+ final match = text('authOpenIDMatchExistingBy');+ _matchExistingBy = match == 'email' || match == 'username' ? match : '';+ _redirectUris = ((s['authOpenIDMobileRedirectURIs'] as List?) ?? const []).map((e) => '$e').toList();+ _groupClaim.text = text('authOpenIDGroupClaim');+ _permsClaim.text = text('authOpenIDAdvancedPermsClaim');+ final subfolder = s['authOpenIDSubfolderForRedirectURLs'];+ _sendSubfolder = subfolder is String;+ _subfolder = subfolder is String ? subfolder : _defaultSubfolder;+ }++ void _toast(String message, {bool error = true}) => showOverlayToast(context, message,+ icon: error ? Icons.error_outline_rounded : Icons.check_circle_outline_rounded);++ Future<void> _autoPopulate() async {+ final l = AppLocalizations.of(context)!;+ final api = context.read<AuthProvider>().apiService;+ if (api == null) return;+ var issuer = _issuer.text.trim();+ if (issuer.endsWith('/')) issuer = issuer.substring(0, issuer.length - 1);+ const wellKnown = '/.well-known/openid-configuration';+ if (issuer.endsWith(wellKnown)) {+ issuer = issuer.substring(0, issuer.length - wellKnown.length);+ _issuer.text = issuer;+ }+ if (issuer.isEmpty) {+ _toast(l.authSetFieldRequired(l.authSetIssuerUrl));+ return;+ }+ setState(() => _populating = true);+ final r = await api.getOpenIdIssuerConfig(issuer);+ if (!mounted) return;+ final c = r.config;+ setState(() {+ _populating = false;+ if (c == null) return;+ void fill(TextEditingController field, String key) {+ final v = c[key];+ if (v is String && v.isNotEmpty) field.text = v;+ }+ fill(_issuer, 'issuer');+ fill(_authorizeUrl, 'authorization_endpoint');+ fill(_tokenUrl, 'token_endpoint');+ fill(_userInfoUrl, 'userinfo_endpoint');+ fill(_logoutUrl, 'end_session_endpoint');+ fill(_jwksUrl, 'jwks_uri');+ final algs = c['id_token_signing_alg_values_supported'];+ if (algs is List && algs.isNotEmpty) {+ _algorithms = algs.map((e) => '$e').toList();+ if (!_algorithms.contains(_signingAlgorithm.text.trim())) {+ _signingAlgorithm.text = _algorithms.first;+ }+ }+ });+ if (c == null) _toast(l.authSetIssuerFailed(r.error ?? ''));+ }++ void _addRedirect() {+ final l = AppLocalizations.of(context)!;+ final uri = _newRedirect.text.trim();+ if (uri.isEmpty) return;+ if (uri != '*' && !_redirectPattern.hasMatch(uri)) {+ _toast(l.authSetInvalidRedirectUri(uri));+ return;+ }+ setState(() {+ if (!_redirectUris.contains(uri)) _redirectUris = [..._redirectUris, uri];+ _newRedirect.clear();+ });+ }++ String? _validationError(AppLocalizations l) {+ if (!_localAuth && !_openId) return l.authSetNeedOneMethod;+ if (!_openId) return null;+ for (final (label, field) in [+ (l.authSetIssuerUrl, _issuer),+ (l.authSetAuthorizeUrl, _authorizeUrl),+ (l.authSetTokenUrl, _tokenUrl),+ (l.authSetUserinfoUrl, _userInfoUrl),+ (l.authSetJwksUrl, _jwksUrl),+ (l.authSetClientId, _clientId),+ (l.authSetClientSecret, _clientSecret),+ (l.authSetSigningAlgorithm, _signingAlgorithm),+ ]) {+ if (field.text.trim().isEmpty) return l.authSetFieldRequired(label);+ }+ if (_redirectUris.contains('*') && _redirectUris.length > 1) return l.authSetAsteriskAlone;+ for (final uri in _redirectUris) {+ if (uri != '*' && !_redirectPattern.hasMatch(uri)) return l.authSetInvalidRedirectUri(uri);+ }+ for (final (label, field) in [+ (l.authSetGroupClaim, _groupClaim),+ (l.authSetPermsClaim, _permsClaim),+ ]) {+ final claim = field.text.trim();+ if (claim.isNotEmpty && !_claimPattern.hasMatch(claim)) return l.authSetInvalidClaim(label);+ }+ return null;+ }++ Map<String, dynamic> _payload() {+ String? orNull(TextEditingController field) {+ final v = field.text.trim();+ return v.isEmpty ? null : v;+ }+ return {+ 'authLoginCustomMessage': _showMessage ? orNull(_message) : null,+ 'authActiveAuthMethods': [if (_localAuth) 'local', if (_openId) 'openid'],+ 'authOpenIDIssuerURL': orNull(_issuer),+ 'authOpenIDAuthorizationURL': orNull(_authorizeUrl),+ 'authOpenIDTokenURL': orNull(_tokenUrl),+ 'authOpenIDUserInfoURL': orNull(_userInfoUrl),+ 'authOpenIDJwksURL': orNull(_jwksUrl),+ 'authOpenIDLogoutURL': orNull(_logoutUrl),+ 'authOpenIDClientID': orNull(_clientId),+ 'authOpenIDClientSecret': orNull(_clientSecret),+ 'authOpenIDTokenSigningAlgorithm': orNull(_signingAlgorithm),+ 'authOpenIDButtonText': orNull(_buttonText),+ 'authOpenIDAutoLaunch': _autoLaunch,+ 'authOpenIDAutoRegister': _autoRegister,+ 'authOpenIDMatchExistingBy': _matchExistingBy.isEmpty ? null : _matchExistingBy,+ 'authOpenIDMobileRedirectURIs': _redirectUris,+ 'authOpenIDGroupClaim': _groupClaim.text.trim(),+ 'authOpenIDAdvancedPermsClaim': _permsClaim.text.trim(),+ if (_sendSubfolder) 'authOpenIDSubfolderForRedirectURLs': _subfolder,+ };+ }++ Future<void> _save() async {+ final l = AppLocalizations.of(context)!;+ final error = _validationError(l);+ if (error != null) {+ _toast(error);+ return;+ }+ final auth = context.read<AuthProvider>();+ final api = auth.apiService;+ if (api == null) return;+ setState(() => _saving = true);+ final r = await api.updateAuthSettings(_payload());+ if (!mounted) return;+ setState(() => _saving = false);+ if (r == null) {+ _toast(l.srvSaveFailed);+ return;+ }+ final serverSettings = r['serverSettings'];+ if (serverSettings is Map<String, dynamic>) auth.applyServerSettings(serverSettings);+ _toast(r['updated'] == true ? l.srvSaved : l.authSetNoChanges, error: false);+ }++ @override+ Widget build(BuildContext context) {+ final cs = Theme.of(context).colorScheme;+ final tt = Theme.of(context).textTheme;+ final l = AppLocalizations.of(context)!;++ return Scaffold(+ backgroundColor: Theme.of(context).scaffoldBackgroundColor,+ body: SafeArea(+ child: Column(children: [+ Padding(+ padding: const EdgeInsets.fromLTRB(20, 12, 8, 0),+ child: Row(children: [+ Expanded(child: AbsorbPageHeader(title: l.adminAuthentication, padding: EdgeInsets.zero)),+ IconButton(+ icon: Icon(Icons.close_rounded, color: cs.onSurfaceVariant),+ onPressed: () => Navigator.pop(context),+ ),+ ]),+ ),+ const SizedBox(height: 12),+ Expanded(+ child: _loading+ ? const Center(child: CircularProgressIndicator(strokeWidth: 2))+ : _settings == null+ ? _loadFailed(cs, tt, l)+ : _form(cs, tt, l),+ ),+ ]),+ ),+ );+ }++ Widget _loadFailed(ColorScheme cs, TextTheme tt, AppLocalizations l) => Center(+ child: Column(mainAxisSize: MainAxisSize.min, children: [+ Text(l.authSetLoadFailed, style: tt.bodyMedium?.copyWith(color: cs.onSurfaceVariant)),+ const SizedBox(height: 12),+ OutlinedButton(onPressed: _load, child: Text(l.retry)),+ ]),+ );++ Widget _form(ColorScheme cs, TextTheme tt, AppLocalizations l) {+ final subfolderOptions = [+ '',+ _defaultSubfolder,+ if (_subfolder.isNotEmpty && _subfolder != _defaultSubfolder) _subfolder,+ ];+ final sample = _settings?['authOpenIDSamplePermissions']?.toString() ?? '';+ final mono = tt.bodySmall?.copyWith(fontFamily: 'monospace', color: cs.onSurface);++ return ListView(+ padding: const EdgeInsets.only(bottom: 90),+ children: [+ _card(cs, [+ _switch(tt, l.authSetCustomMessage, _showMessage, (v) => setState(() => _showMessage = v)),+ if (_showMessage) ...[+ _field(_message, l.authSetMessage, maxLines: 5),+ const SizedBox(height: 4),+ ],+ ]),+ const SizedBox(height: 12),+ _card(cs, [+ _switch(tt, l.authSetPasswordAuth, _localAuth, (v) => setState(() => _localAuth = v)),+ ]),+ const SizedBox(height: 12),+ _card(cs, [+ Row(children: [+ Expanded(+ child: _switch(tt, l.authSetOpenId, _openId, (v) => setState(() => _openId = v)),+ ),+ IconButton(+ tooltip: l.authSetGuide,+ icon: Icon(Icons.help_outline_rounded, size: 20, color: cs.onSurfaceVariant),+ onPressed: () => launchUrl(Uri.parse(_guideUrl), mode: LaunchMode.externalApplication),+ ),+ ]),+ if (_openId) ...[+ Row(crossAxisAlignment: CrossAxisAlignment.end, children: [+ Expanded(child: _field(_issuer, l.authSetIssuerUrl, url: true)),+ const SizedBox(width: 8),+ Padding(+ padding: const EdgeInsets.only(bottom: 4),+ child: OutlinedButton.icon(+ onPressed: _populating || _saving ? null : _autoPopulate,+ icon: _populating+ ? const SizedBox(width: 14, height: 14, child: CircularProgressIndicator(strokeWidth: 2))+ : const Icon(Icons.auto_fix_high_rounded, size: 16),+ label: Text(l.authSetAutoPopulate),+ ),+ ),+ ]),+ _field(_authorizeUrl, l.authSetAuthorizeUrl, url: true),+ _field(_tokenUrl, l.authSetTokenUrl, url: true),+ _field(_userInfoUrl, l.authSetUserinfoUrl, url: true),+ _field(_jwksUrl, l.authSetJwksUrl, url: true),+ _field(_logoutUrl, l.authSetLogoutUrl, url: true),+ _field(_clientId, l.authSetClientId),+ _field(_clientSecret, l.authSetClientSecret,+ obscure: !_showSecret,+ suffix: IconButton(+ icon: Icon(_showSecret ? Icons.visibility_off_rounded : Icons.visibility_rounded, size: 20),+ onPressed: () => setState(() => _showSecret = !_showSecret),+ )),+ if (_algorithms.isNotEmpty)+ _dropdown<String>(tt, l.authSetSigningAlgorithm, _signingAlgorithm.text.trim(), _algorithms,+ (v) => setState(() => _signingAlgorithm.text = v))+ else+ _field(_signingAlgorithm, l.authSetSigningAlgorithm),+ const SizedBox(height: 16),+ Text(l.authSetRedirectUris, style: tt.bodyMedium),+ const SizedBox(height: 8),+ Wrap(spacing: 8, runSpacing: 8, children: [+ for (final uri in _redirectUris)+ Chip(+ label: Text(uri),+ onDeleted: _saving+ ? null+ : () => setState(() => _redirectUris = _redirectUris.where((u) => u != uri).toList()),+ ),+ if (!_redirectUris.contains(_absorbRedirect) && !_redirectUris.contains('*'))+ ActionChip(+ avatar: const Icon(Icons.add_rounded, size: 18),+ label: Text(l.authSetAddAbsorbRedirect),+ onPressed: _saving ? null : () => setState(() => _redirectUris = [..._redirectUris, _absorbRedirect]),+ ),+ ]),+ Row(children: [+ Expanded(+ child: _field(_newRedirect, l.authSetAddRedirectUri, hint: 'app://oauth', onSubmitted: (_) => _addRedirect()),+ ),+ const SizedBox(width: 8),+ IconButton(onPressed: _saving ? null : _addRedirect, icon: const Icon(Icons.add_rounded)),+ ]),+ _info(cs, tt, l.authSetRedirectUrisInfo),+ const SizedBox(height: 8),+ _dropdown<String>(tt, l.authSetSubfolder, _subfolder, subfolderOptions,+ (v) => setState(() {+ _subfolder = v;+ _sendSubfolder = true;+ }),+ labelFor: (v) => v.isEmpty ? l.authSetSubfolderNone : v),+ _info(cs, tt, l.authSetWebRedirectInfo),+ const SizedBox(height: 6),+ SelectableText(+ 'https://<your.server.com>$_subfolder/auth/openid/callback\n'+ 'https://<your.server.com>$_subfolder/auth/openid/mobile-redirect',+ style: mono,+ ),+ _field(_buttonText, l.authSetButtonText),+ const SizedBox(height: 8),+ _dropdown<String>(tt, l.authSetMatchExisting, _matchExistingBy, const ['', 'email', 'username'],+ (v) => setState(() => _matchExistingBy = v),+ labelFor: (v) => switch (v) {+ 'email' => l.authSetMatchEmail,+ 'username' => l.authSetMatchUsername,+ _ => l.authSetMatchNone,+ }),+ _info(cs, tt, l.authSetMatchExistingInfo),+ const SizedBox(height: 8),+ _switch(tt, l.authSetAutoLaunch, _autoLaunch, (v) => setState(() => _autoLaunch = v),+ subtitle: l.authSetAutoLaunchInfo),+ _switch(tt, l.authSetAutoRegister, _autoRegister, (v) => setState(() => _autoRegister = v),+ subtitle: l.authSetAutoRegisterInfo),+ const SizedBox(height: 8),+ _info(cs, tt, l.authSetClaimsInfo),+ _field(_groupClaim, l.authSetGroupClaim, hint: 'groups'),+ _info(cs, tt, l.authSetGroupClaimInfo),+ _field(_permsClaim, l.authSetPermsClaim, hint: 'abspermissions'),+ _info(cs, tt, l.authSetPermsClaimInfo),+ if (sample.isNotEmpty) ...[+ const SizedBox(height: 8),+ Container(+ padding: const EdgeInsets.all(12),+ decoration: BoxDecoration(+ color: cs.surfaceContainerHighest,+ borderRadius: BorderRadius.circular(10),+ ),+ child: SelectableText(sample, style: mono),+ ),+ ],+ const SizedBox(height: 4),+ ],+ ]),+ const SizedBox(height: 16),+ if (_openId)+ Padding(+ padding: const EdgeInsets.fromLTRB(16, 0, 16, 12),+ child: Container(+ padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 10),+ decoration: BoxDecoration(color: Colors.orange.withValues(alpha: 0.1), borderRadius: BorderRadius.circular(12)),+ child: Row(children: [+ Icon(Icons.warning_amber_rounded, size: 18, color: Colors.orange.withValues(alpha: 0.9)),+ const SizedBox(width: 10),+ Expanded(child: Text(l.authSetRestartNote,+ style: tt.bodySmall?.copyWith(color: cs.onSurface.withValues(alpha: 0.7)))),+ ]),+ ),+ ),+ Padding(+ padding: const EdgeInsets.symmetric(horizontal: 16),+ child: SizedBox(+ width: double.infinity,+ child: FilledButton.icon(+ onPressed: _saving ? null : _save,+ icon: _saving+ ? SizedBox(width: 14, height: 14,+ child: CircularProgressIndicator(strokeWidth: 2, color: cs.onPrimary))+ : const Icon(Icons.save_rounded, size: 18),+ label: Text(l.srvSave),+ ),+ ),+ ),+ ],+ );+ }++ Widget _card(ColorScheme cs, List<Widget> children) => Padding(+ padding: const EdgeInsets.symmetric(horizontal: 16),+ child: Material(+ color: cs.surfaceContainerHigh,+ borderRadius: BorderRadius.circular(16),+ clipBehavior: Clip.antiAlias,+ child: Padding(+ padding: const EdgeInsets.fromLTRB(16, 8, 16, 12),+ child: Column(crossAxisAlignment: CrossAxisAlignment.stretch, children: children),+ ),+ ),+ );++ Widget _switch(TextTheme tt, String label, bool value, ValueChanged<bool> onChanged, {String? subtitle}) =>+ SwitchListTile(+ contentPadding: EdgeInsets.zero,+ title: Text(label, style: tt.bodyMedium),+ subtitle: subtitle == null ? null : Text(subtitle, style: tt.bodySmall),+ value: value,+ onChanged: _saving ? null : onChanged,+ );++ Widget _field(TextEditingController controller, String label,+ {String? hint, bool url = false, bool obscure = false, int maxLines = 1, Widget? suffix,+ ValueChanged<String>? onSubmitted}) =>+ Padding(+ padding: const EdgeInsets.only(top: 12),+ child: TextField(+ controller: controller,+ enabled: !_saving,+ obscureText: obscure,+ autocorrect: false,+ enableSuggestions: false,+ maxLines: obscure ? 1 : maxLines,+ minLines: 1,+ keyboardType: maxLines > 1 ? TextInputType.multiline : (url ? TextInputType.url : TextInputType.text),+ onSubmitted: onSubmitted,+ decoration: InputDecoration(labelText: label, hintText: hint, suffixIcon: suffix),+ ),+ );++ Widget _info(ColorScheme cs, TextTheme tt, String text) => Padding(+ padding: const EdgeInsets.only(top: 6),+ child: Text(text, style: tt.bodySmall?.copyWith(color: cs.onSurfaceVariant)),+ );++ Widget _dropdown<T>(TextTheme tt, String label, T value, List<T> options, ValueChanged<T> onChanged,+ {String Function(T)? labelFor}) =>+ Padding(+ padding: const EdgeInsets.only(top: 8),+ child: Row(children: [+ Expanded(child: Text(label, style: tt.bodyMedium)),+ DropdownButton<T>(+ value: value,+ borderRadius: BorderRadius.circular(12),+ underline: const SizedBox.shrink(),+ items: options+ .map((o) => DropdownMenuItem<T>(value: o, child: Text(labelFor?.call(o) ?? '$o')))+ .toList(),+ onChanged: _saving+ ? null+ : (v) {+ if (v != null) onChanged(v);+ },+ ),+ ]),+ );+}diff --git a/lib/screens/admin_screen.dart b/lib/screens/admin_screen.dartindex 0cb3e615..54fb571e 100644--- a/lib/screens/admin_screen.dart+++ b/lib/screens/admin_screen.dart@@ -20,6 +20,7 @@ import 'admin_missing_items_screen.dart';import 'admin_email_screen.dart';import 'admin_api_keys_screen.dart';import 'admin_libraries_screen.dart';+import 'admin_auth_settings_screen.dart';import 'admin_server_settings_screen.dart';import 'admin_server_logs_screen.dart';import 'admin_stats_screen.dart';@@ -410,6 +411,16 @@ class _AdminScreenState extends State<AdminScreen> with WidgetsBindingObserver {},),const SizedBox(height: 10),+ _navButton(cs, tt,+ icon: Icons.lock_person_rounded,+ label: l.adminAuthentication,+ subtitle: l.adminAuthenticationSubtitle,+ onTap: () {+ Navigator.push(context, MaterialPageRoute(+ builder: (_) => const AdminAuthSettingsScreen()));+ },+ ),+ const SizedBox(height: 10),_navButton(cs, tt,icon: Icons.description_outlined,label: 'Server logs',@@ -485,6 +496,7 @@ class _AdminScreenState extends State<AdminScreen> with WidgetsBindingObserver {AdminSectionDestination('api-keys', Icons.vpn_key_rounded, l.adminApiKeys),AdminSectionDestination('libraries', Icons.library_books_rounded, l.adminLibrariesManage),AdminSectionDestination('server-settings', Icons.tune_rounded, l.adminServerSettings),+ AdminSectionDestination('authentication', Icons.lock_person_rounded, l.adminAuthentication),const AdminSectionDestination('logs', Icons.description_outlined, 'Server logs'),AdminSectionDestination('stats', Icons.bar_chart_rounded, l.adminStats),AdminSectionDestination('sessions', Icons.history_rounded, l.adminAllSessions),@@ -901,6 +913,8 @@ class _AdminScreenState extends State<AdminScreen> with WidgetsBindingObserver {return AdminLibrariesScreen(libraries: _libraries);case 'server-settings':return const AdminServerSettingsScreen();+ case 'authentication':+ return const AdminAuthSettingsScreen();case 'logs':return const AdminServerLogsScreen();case 'stats':diff --git a/lib/screens/app_shell.dart b/lib/screens/app_shell.dartindex 24a73c63..be83636a 100644--- a/lib/screens/app_shell.dart+++ b/lib/screens/app_shell.dart@@ -29,6 +29,7 @@ import '../widgets/rmab_search_results_sheet.dart';import 'admin_email_screen.dart';import 'admin_libraries_screen.dart';import 'admin_server_logs_screen.dart';+import 'admin_auth_settings_screen.dart';import 'admin_server_settings_screen.dart';import 'admin_sessions_screen.dart';import 'admin_stats_screen.dart';@@ -1347,6 +1348,8 @@ class _AppShellState extends State<AppShell>switch (page) {case 'settings':screen = const AdminServerSettingsScreen();+ case 'auth':+ screen = const AdminAuthSettingsScreen();case 'logs':screen = const AdminServerLogsScreen();case 'stats':diff --git a/lib/services/api_service.dart b/lib/services/api_service.dartindex 2265a309..4a3e0767 100644--- a/lib/services/api_service.dart+++ b/lib/services/api_service.dart@@ -3821,6 +3821,45 @@ class ApiService {return null;}+ /// GET /api/auth-settings - password and OpenID Connect settings (admin only).+ Future<Map<String, dynamic>?> getAuthSettings() async {+ try {+ final r = await _authGet(Uri.parse('$_cleanBaseUrl/api/auth-settings'));+ if (r.statusCode == 200) return jsonDecode(r.body) as Map<String, dynamic>;+ debugPrint('[API] getAuthSettings failed: ${r.statusCode}');+ } catch (e) { debugPrint('[API] getAuthSettings error: $e'); }+ return null;+ }++ /// PATCH /api/auth-settings (admin only). Returns { updated, serverSettings }.+ Future<Map<String, dynamic>?> updateAuthSettings(Map<String, dynamic> patch) async {+ try {+ final r = await _authPatch(Uri.parse('$_cleanBaseUrl/api/auth-settings'),+ body: jsonEncode(patch));+ if (r.statusCode == 200) return jsonDecode(r.body) as Map<String, dynamic>;+ debugPrint('[API] updateAuthSettings failed: ${r.statusCode}');+ } catch (e) { debugPrint('[API] updateAuthSettings error: $e'); }+ return null;+ }++ /// GET /auth/openid/config?issuer= - the server fetches the issuer's+ /// openid-configuration (admin only). On failure [error] holds the+ /// server's message.+ Future<({Map<String, dynamic>? config, String? error})> getOpenIdIssuerConfig(String issuer) async {+ try {+ final r = await _authGet(Uri.parse('$_cleanBaseUrl/auth/openid/config')+ .replace(queryParameters: {'issuer': issuer}));+ if (r.statusCode == 200) {+ return (config: jsonDecode(r.body) as Map<String, dynamic>, error: null);+ }+ final body = r.body.trim();+ return (config: null, error: body.isNotEmpty ? body : 'HTTP ${r.statusCode}');+ } catch (e) {+ debugPrint('[API] getOpenIdIssuerConfig error: $e');+ return (config: null, error: e.toString());+ }+ }+/// GET /api/stats/server — { books, podcasts, total } (admin only).Future<Map<String, dynamic>?> getServerStats() async {try {diff --git a/lib/widgets/nav_hold_options.dart b/lib/widgets/nav_hold_options.dartindex b98ddf11..56e23585 100644--- a/lib/widgets/nav_hold_options.dart+++ b/lib/widgets/nav_hold_options.dart@@ -51,6 +51,7 @@ const navHoldAdminPages = ['email','apikeys','settings',+ 'auth','logs','stats',];@@ -64,6 +65,7 @@ IconData navHoldAdminIcon(String page) => switch (page) {'email' => Icons.email_rounded,'apikeys' => Icons.vpn_key_rounded,'settings' => Icons.tune_rounded,+ 'auth' => Icons.lock_person_rounded,'logs' => Icons.description_outlined,_ => Icons.bar_chart_rounded,};@@ -77,6 +79,7 @@ String navHoldAdminPageLabel(String page, AppLocalizations l) => switch (page) {'email' => l.adminEmail,'apikeys' => l.adminApiKeys,'settings' => l.adminServerSettings,+ 'auth' => l.adminAuthentication,'logs' => l.navHoldAdminLogs,_ => l.adminStats,};