refactor the exchangeAuthPromptService.js