Amazon Alexa skill account linking using IdentityServer4
It took a lot of reading and quite some time to wade though exactly what was required to get Amazon Alexa account linking working with our Identity Server 4 oauth server. Most of the stuff out there was to perform account linking with Amazon's own OAUTH server, and not IdentityServer4. Well, I finally got to the bottom of it all, and to save you devs valuable time and frustrations, I've laid it all out below: Create your Asp.Net Core API Configure Identity Server 4 for account linking Create your Alexa Skill Account link your Alexa skill to Identity Server 4. Amazon will take care to call your Identity Server 4 to obtain a token and manage refresh tokens for you. Call your API from Alexa. Alexa voice command → Amazon Lambda function → [Hidden Identity Server 4 call] → Asp.Net Core API → Return Speech back to Alexa to say aloud. Asp.Net Core API The controller for your Alexa API should look something like this: The IDataService is used solely for accessing the data