Constructors
new SimpleSignInService()
new SimpleSignInService():SimpleSignInService
Returns
SimpleSignInService
Methods
getUserAndLinks()
static getUserAndLinks(identityProviderName): Promise<GetUserAndLinksResponse>
Initiates a request to fetch Simple Sign-in related data for the current active Amazon user
on the device through the requesting app. The response includes the following pieces of data:
- The list of active linked accounts along with a new SSI token for each account.
- Your scoped identity of the Amazon user, used by apps to scope the linkToken to an Amazon user during token generation.
Parameters
identityProviderName
string
The name of the identity provider you use to authenticate
users signing into your apps. This is the id you received
during Simple Sign-In onboarding on developer console.
Returns
Promise<GetUserAndLinksResponse>
A promise object that when resolves gives the response conatining user-id and
existing links created with Amazon.
linkUserAccount()
static linkUserAccount(request): Promise<LinkUserAccountResponse>
Initiates account linking for a user’s app account. The solution allows N:N mapping
between Amazon and app accounts. There can be multiple app accounts linked to an
Amazon account, and an app account can be linked to multiple Amazon accounts simultaneously.
Before setting up account linking, the Simple Sign-in client prompts for the user’s consent by
displaying a user consent screen. On securing the user’s consent, link data along with linkToken
is stored on the Simple Sign-in server. If a user declines consent for account linking, the
linking process is aborted and the linkToken received from you is discarded.
Parameters
request
LinkUserAccountRequest
Request containing partner user id, identity provider name, user login name,
link token generated by 3P app and link signing key generated by 3P app.
Returns
Promise<LinkUserAccountResponse>
A promise object that when resolves gives the response containing link-id of the link
created and the success-code of the link creation request.

