SimpleSignInService
Presents the primary API for internacting with Amazon Simple Sign-In frameowrk. 3P app developers call the APIs to orchestrate the flow for signing-in their users using Simple Sign-In account linking with Amazon.
Constructors
new SimpleSignInService()
new SimpleSignInService():
SimpleSignInService
Returns
Methods
getUserAndLinks()
staticgetUserAndLinks(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()
staticlinkUserAccount(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
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.
recordMetricEvent()
staticrecordMetricEvent(request):Promise<RecordMetricsEventResponse>
Initiates an event that needs to be recorded for metric publishing. Simple Sign-in business metric reports can be downloaded in the Reporting tab of the Developer Console. These metrics can provide insights into the business value and impact of integrating with SSI.
Parameters
request
Request containing SSI Event, Timestamp in milliseconds and Failure Reason if SSI Event is a failure.
Returns
Promise<RecordMetricsEventResponse>
A promise object that when resolves returns the status if the request was success or failure.
showLoginSelection()
staticshowLoginSelection(loginNames):Promise<ShowLoginSelectionResponse>
Initiates screen to display options to login to users. Before initiating this API, for each linked account fetched using getUserAndLinks API, the app should retrieve a friendly user-recognizable identifier like (login name/email address/profile name) from the app server, and include this data in the request. This data is displayed on the screen and used to help customers easily recognize linked app accounts.
Parameters
loginNames
List of the login-name to display and their link-id mapping.
Returns
Promise<ShowLoginSelectionResponse>
A promise object that when resolves gives the user's selection and the link-id if selected to login with.
Last updated: Oct 02, 2025

