Step 1: Create a login with Amazon Security Profile
First of all, create an LWA profile for your Alexa skill.
Step 2: Configure account linking in the Alexa Developer Console
After doing successful login and user verification processes, under the build tab, go to account linking, and check the “Do you allow the user to create an account or link to an existing account with you?”
Step 3: write your custom skill code
Write your Alexa custom skill code, I prefer to use the Node.Js and then deploy it on AWS Lamba.
Step 4: Test account linking on your skill
When you invoke skill from your device, a card will be received by you in the Alexa app which will be asking you to link your account.
Step 5: Invoke the skill again
Invoke the skill again. Now, because your account is linked, an Amazon OAuth Token is included in the input JSON document.