diff --git a/src/views/oauth/index.vue b/src/views/oauth/index.vue index db53c5e..0cab38d 100644 --- a/src/views/oauth/index.vue +++ b/src/views/oauth/index.vue @@ -14,6 +14,8 @@ + + @@ -60,6 +62,25 @@ + + + + + + + + + + + + + + + + + { + const allowedValues = ["S256", "Plain"]; + if (!allowedValues.includes(value)) { + callback(new Error(T('InvalidParam', { param: 'pkce_method' }))); + } else { + callback(); // 校验通过 + } + }, + trigger: 'change' + } + ] } const toEdit = (row) => { formVisible.value = true @@ -164,7 +200,8 @@ formData.redirect_url = row.redirect_url formData.scopes = row.scopes formData.auto_register = row.auto_register - + formData.pkce_enable = row.pkce_enable + formData.pkce_method = row.pkce_method } const toAdd = () => { formVisible.value = true @@ -177,6 +214,8 @@ formData.redirect_url = '' formData.scopes = '' formData.auto_register = false + formData.pkce_enable = false + formData.pkce_method = 'S256' } const form = ref(null) const submit = async () => {