The API enables the following functionality:
- Link the 3P app user’s account with Amazon account.
- Get existing links for the users of a 3P app.
- Shows a selection screen with options for 3P app user for login.
- Record a business metric.
Get started
Setup
- Add the following library dependency to the
dependenciessection of your package.json file.
- Add the following privilege in your manifest.toml.
- Access the Simple Sign-In system service.
- Allows the screen that asks consent from the user.
- Allows the screen that shows login options to the user.
Usage
The following section shows how to perform account linking and login the user using Simple Sign-In.GetUserAndLinks
The following sample initiates a request to fetch Simple Sign-in related data for the current active Amazon user on the device for your app.LinkUserAccount
The following sample initiates account linking for a user’s app account. The example allows N:N mapping between Amazon and app accounts. Multiple app accounts can be simultaneously linked to an Amazon account, and an app account can be linked to multiple Amazon accounts.ShowLoginSelection
The following sample opens a dialog that displays login options to users. Before calling this method, get the friendly user-recognizable identifier for each linked account and include the identifier in the request. To retrieve the identifiers call thegetUserAndLinks() method. User-recognizable identifiers include login name, email address, or profile name. The code displays thes identifiers on the screen and to help customers easily recognize linked app accounts.
RecordMetricEvent
The following sample fires an event that is recorded for metric publishing. You can download Simple Sign-in business metric reports in the Reporting tab of the Developer Console. These metrics can provide insights into the business value and impact of integrating with Simple Sign-in.Implementing the sign-in flow
Before implementing the sign-in flow, you’ll need your Identity Provider Name (IDP_NAME), which is provided during your app’s onboarding process in the Developer Console. This unique identifier connects your app to the Simple Sign-In service.
Getting Started with Sign-In
The sign-in process typically begins when:- Your app launches
- A user clicks a login button
- A session requires authentication
GetUserAndLinks() method.
Account Linking Process
After a successful standard login, you should link the user’s account to enable seamless sign-in for future sessions. This process creates a secure connection between the user’s Amazon account and your app’s account. The following sample links the user account to the app using your app’s standard login method. Every time the user signs in using the standard login process of your app, call theLinkUserAccount() method.
Troubleshooting
- Consent screen or Login Selection Screen is not showing. Make sure you manifest is updated.
-
API calls return
FEATURE_TURNED_OFFin request status. The user has disabled the Simple Sign-in feature at the account level, device level, or for your app. -
API calls return
NOT_AVAILABLEin request status. The Simple Sign-in feature is not available in the region the device is running.
Enumerations
Classes
Type Aliases
- GetUserAndLinksResponse
- Link
- LinkUserAccountRequest
- LinkUserAccountResponse
- LoginNameValue
- RecordMetricsEventResponse
- ShowLoginSelectionResponse
- SSIEventRequest
- Token

