Added the missing extractCredential method and replaced the old callback strategy with the new try-catch block.