External Authentication Workaround for api.asApp.withProvider() Error

+1. While looking for solutions I found this post but how the heck do you get the credentials to save them in key-value storage.