Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Skip to main content
Manages the interaction with the LWATurboModules (Login with Amazon). This class provides methods to register event listeners, obtain tokens, authorize users, retrieve user information, and sign out.

Constructors

new AuthorizationManager()

new AuthorizationManager(): AuthorizationManager

Returns

AuthorizationManager

Methods

authorize()

static authorize(authorizeRequest, authorizeCallbacks?): void Performs authorization (using OAuth 2.0) using the specified scopes in the AuthorizeRequest object. By default, an Amazon-hosted WebView is used to present a page that prompts the user to authorize the application. To be notified when the authorization flow has finished, register an AuthorizeCallbacks on the request. The user should provide consent for these scopes before this authorization call. This method will initiate the OAuth flow.

Parameters

authorizeRequest
AuthorizeRequest Object containing the scopes for which authorization is requested. The user must grant consent for these scopes.
authorizeCallbacks?
AuthorizeCallbacks Optional callbacks to handle authorization success, failure, or cancellation.

Returns

void

Throws

  • Throws an error if keplerLWATurboModules is not available.

getToken()

static getToken(getTokenCallbacks?): void Requests an authorization token (using OAuth 2.0). The authorize API method must have been called successfully with the same scopes, and the user must have granted consent to those scopes once, prior to this call, in order to get a token. If the app has restarted since the last authorize call, getToken may still succeed using the cached credentials.

Parameters

getTokenCallbacks?
GetTokenCallbacks Optional callbacks to handle token retrieval success or failure.

Returns

void

Throws

  • Throws an error if keplerLWATurboModules is not available.

Last modified on October 2, 2025