4848 t(getOAuthKey('refreshTokenAuth'))
4949 }}</span >
5050 </label >
51+ <label v-if =" showMobileRefreshTokenOption" class =" flex cursor-pointer items-center gap-2" >
52+ <input
53+ v-model =" inputMethod"
54+ type =" radio"
55+ value =" mobile_refresh_token"
56+ class =" text-blue-600 focus:ring-blue-500"
57+ />
58+ <span class =" text-sm text-blue-900 dark:text-blue-200" >{{
59+ t('admin.accounts.oauth.openai.mobileRefreshTokenAuth', '手动输入 Mobile RT')
60+ }}</span >
61+ </label >
5162 <label v-if =" showSessionTokenOption" class =" flex cursor-pointer items-center gap-2" >
5263 <input
5364 v-model =" inputMethod"
7384 </div >
7485 </div >
7586
76- <!-- Refresh Token Input (OpenAI / Antigravity) -->
77- <div v-if =" inputMethod === 'refresh_token'" class =" space-y-4" >
87+ <!-- Refresh Token Input (OpenAI / Antigravity / Mobile RT ) -->
88+ <div v-if =" inputMethod === 'refresh_token' || inputMethod === 'mobile_refresh_token' " class =" space-y-4" >
7889 <div
7990 class =" rounded-lg border border-blue-300 bg-white/80 p-4 dark:border-blue-600 dark:bg-gray-800/80"
8091 >
@@ -759,6 +770,7 @@ interface Props {
759770 methodLabel? : string
760771 showCookieOption? : boolean // Whether to show cookie auto-auth option
761772 showRefreshTokenOption? : boolean // Whether to show refresh token input option (OpenAI only)
773+ showMobileRefreshTokenOption? : boolean // Whether to show mobile refresh token option (OpenAI only)
762774 showSessionTokenOption? : boolean // Whether to show session token input option (Sora only)
763775 showAccessTokenOption? : boolean // Whether to show access token input option (Sora only)
764776 platform? : AccountPlatform // Platform type for different UI/text
@@ -776,6 +788,7 @@ const props = withDefaults(defineProps<Props>(), {
776788 methodLabel: ' Authorization Method' ,
777789 showCookieOption: true ,
778790 showRefreshTokenOption: false ,
791+ showMobileRefreshTokenOption: false ,
779792 showSessionTokenOption: false ,
780793 showAccessTokenOption: false ,
781794 platform: ' anthropic' ,
@@ -787,6 +800,7 @@ const emit = defineEmits<{
787800 ' exchange-code' : [code : string ]
788801 ' cookie-auth' : [sessionKey : string ]
789802 ' validate-refresh-token' : [refreshToken : string ]
803+ ' validate-mobile-refresh-token' : [refreshToken : string ]
790804 ' validate-session-token' : [sessionToken : string ]
791805 ' import-access-token' : [accessToken : string ]
792806 ' update:inputMethod' : [method : AuthInputMethod ]
@@ -834,7 +848,7 @@ const oauthState = ref('')
834848const projectId = ref (' ' )
835849
836850// Computed: show method selection when either cookie or refresh token option is enabled
837- const showMethodSelection = computed (() => props .showCookieOption || props .showRefreshTokenOption || props .showSessionTokenOption || props .showAccessTokenOption )
851+ const showMethodSelection = computed (() => props .showCookieOption || props .showRefreshTokenOption || props .showMobileRefreshTokenOption || props . showSessionTokenOption || props .showAccessTokenOption )
838852
839853// Clipboard
840854const { copied, copyToClipboard } = useClipboard ()
@@ -945,7 +959,11 @@ const handleCookieAuth = () => {
945959
946960const handleValidateRefreshToken = () => {
947961 if (refreshTokenInput .value .trim ()) {
948- emit (' validate-refresh-token' , refreshTokenInput .value .trim ())
962+ if (inputMethod .value === ' mobile_refresh_token' ) {
963+ emit (' validate-mobile-refresh-token' , refreshTokenInput .value .trim ())
964+ } else {
965+ emit (' validate-refresh-token' , refreshTokenInput .value .trim ())
966+ }
949967 }
950968}
951969
0 commit comments