Преглед изворни кода

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 месеци
родитељ
комит
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')
   }
 
-  const hostname = `${shopname}.shoprenter.hu`
-  const path = '/oauth/token'
+  const hostname = `${shopname}.api2.myshoprenter.hu`
+  const path = '/api/oauth/token'
 
   const requestBody = JSON.stringify({
     grant_type: 'refresh_token',