@sveltia/cms 0.161.1 → 0.162.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/types/public.d.ts CHANGED
@@ -2039,6 +2039,10 @@ export type CommitMessages = {
2039
2039
  */
2040
2040
  openAuthoring?: string;
2041
2041
  };
2042
+ /**
2043
+ * Authentication method name for Git backends.
2044
+ */
2045
+ export type AuthMethodName = "oauth" | "token";
2042
2046
  /**
2043
2047
  * Git backend properties.
2044
2048
  */
@@ -2077,11 +2081,12 @@ export type GitBackendProps = {
2077
2081
  */
2078
2082
  skip_ci?: boolean;
2079
2083
  /**
2080
- * Whether to allow users to authenticate using an access
2081
- * token. Default: `true`. If set to `false`, the “Sign In Using Access Token” button will be
2082
- * disabled in the UI, and users will be forced to use OAuth authentication.
2084
+ * Allowed authentication methods. Default: both `oauth`
2085
+ * and `token` are allowed. To restrict sign-in options, specify only the methods you want to
2086
+ * enable, e.g. `[oauth]` to disable access token sign-in, or `[token]` to disable OAuth sign-in. An
2087
+ * empty array is invalid and will result in a configuration error.
2083
2088
  */
2084
- allow_token_auth?: boolean;
2089
+ auth_methods?: AuthMethodName[];
2085
2090
  /**
2086
2091
  * Whether to include credentials in API requests.
2087
2092
  * Default: `false`. If set to `true`, credentials such as cookies will be included in API requests.