fix(vikon): use api_domain for OAuth authorize URL (not auth_domain)
Original vikon_core used db-nica.ru for /oauth2/authorize, not auth.db-nica.ru. This was causing 'Client authentication failed' error.
This commit is contained in:
@@ -34,7 +34,7 @@ class VikonController extends Controller
|
||||
'is_authenticated' => $isAuth,
|
||||
'current_version' => config('vikon.current_version'),
|
||||
'modules' => config('vikon.modules'),
|
||||
'vikon_auth_domain' => config('vikon.auth_domain'),
|
||||
'vikon_api_domain' => config('vikon.api_domain'),
|
||||
'vikon_client_id' => config('vikon.client_id'),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ const props = defineProps({
|
||||
is_authenticated: Boolean,
|
||||
current_version: String,
|
||||
modules: Object,
|
||||
vikon_auth_domain: String,
|
||||
vikon_api_domain: String,
|
||||
vikon_client_id: String,
|
||||
});
|
||||
|
||||
@@ -142,7 +142,7 @@ const accessInfo = ref({ has_access: false, error: null });
|
||||
|
||||
const authUrl = computed(() => {
|
||||
const redirect = encodeURIComponent(route('dashboard.vikon-updates.index'));
|
||||
return `${props.vikon_auth_domain}oauth2/authorize?client_id=${props.vikon_client_id}&redirect_uri=${redirect}&response_type=code`;
|
||||
return `${props.vikon_api_domain}oauth2/authorize?client_id=${props.vikon_client_id}&redirect_uri=${redirect}&response_type=code`;
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
Reference in New Issue
Block a user