|
@@ -154,6 +154,13 @@ serve(wrapHandler('oauth-shoprenter-callback', async (req) => {
|
|
|
// Log which environment variables are being used
|
|
// Log which environment variables are being used
|
|
|
console.log(`[ShopRenter] Using client ID from: ${Deno.env.get('SHOPRENTER_APP_CLIENT_ID') ? 'SHOPRENTER_APP_CLIENT_ID' : 'SHOPRENTER_CLIENT_ID'}`)
|
|
console.log(`[ShopRenter] Using client ID from: ${Deno.env.get('SHOPRENTER_APP_CLIENT_ID') ? 'SHOPRENTER_APP_CLIENT_ID' : 'SHOPRENTER_CLIENT_ID'}`)
|
|
|
console.log(`[ShopRenter] Using client secret from: ${Deno.env.get('SHOPRENTER_APP_CLIENT_SECRET') ? 'SHOPRENTER_APP_CLIENT_SECRET' : 'SHOPRENTER_CLIENT_SECRET'}`)
|
|
console.log(`[ShopRenter] Using client secret from: ${Deno.env.get('SHOPRENTER_APP_CLIENT_SECRET') ? 'SHOPRENTER_APP_CLIENT_SECRET' : 'SHOPRENTER_CLIENT_SECRET'}`)
|
|
|
|
|
+ // Log first 4 and last 4 chars of secret for debugging (safe to expose)
|
|
|
|
|
+ if (shoprenterClientSecret) {
|
|
|
|
|
+ const secretPreview = shoprenterClientSecret.length > 8
|
|
|
|
|
+ ? `${shoprenterClientSecret.substring(0, 4)}...${shoprenterClientSecret.substring(shoprenterClientSecret.length - 4)}`
|
|
|
|
|
+ : '(too short)';
|
|
|
|
|
+ console.log(`[ShopRenter] Client secret preview: ${secretPreview} (length: ${shoprenterClientSecret.length})`)
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
if (!shoprenterClientId || !shoprenterClientSecret) {
|
|
if (!shoprenterClientId || !shoprenterClientSecret) {
|
|
|
console.error('ShopRenter client credentials not configured. Set either SHOPRENTER_APP_CLIENT_ID/SECRET or SHOPRENTER_CLIENT_ID/SECRET')
|
|
console.error('ShopRenter client credentials not configured. Set either SHOPRENTER_APP_CLIENT_ID/SECRET or SHOPRENTER_CLIENT_ID/SECRET')
|