Просмотр исходного кода

fix: correct ShopRenter token refresh URL #79

Fixed the token refresh URL in shoprenter-client.ts to use the correct API endpoint:
- Changed hostname from {shopname}.shoprenter.hu to {shopname}.api2.myshoprenter.hu
- Changed path from /oauth/token to /api/oauth/token

This fixes the "Invalid token" error when manually syncing ShopRenter stores.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Claude 5 месяцев назад
Родитель
Сommit
62f5ebbd18
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      supabase/functions/_shared/shoprenter-client.ts

+ 2 - 2
supabase/functions/_shared/shoprenter-client.ts

@@ -412,8 +412,8 @@ async function refreshAccessToken(shopname: string, refreshToken: string) {
     throw new Error('ShopRenter credentials not configured')
     throw new Error('ShopRenter credentials not configured')
   }
   }
 
 
-  const hostname = `${shopname}.shoprenter.hu`
-  const path = '/oauth/token'
+  const hostname = `${shopname}.api2.myshoprenter.hu`
+  const path = '/api/oauth/token'
 
 
   const requestBody = JSON.stringify({
   const requestBody = JSON.stringify({
     grant_type: 'refresh_token',
     grant_type: 'refresh_token',