Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Page Tree Search | ||
---|---|---|
|
Registration
USTA’s implementation of Cognito introduces a 2 step registration process (Cognito Native and Lightweight Account Registration). Due to limitations with customizing the Cognito Hosted Registration page, the approach taken is to break up registration into two steps.
Info |
---|
Note: Step 2 of the registration process must be completed within one hour. Accounts created in Cognito that have not been completed within one hour will be deleted. |
The proposed UX flow would work in the following way:
Expand | ||
---|---|---|
| ||
|
Expand | ||
---|---|---|
| ||
Expand | ||
---|---|---|
| ||
Please refer to the sequence diagrams for the technical flow |
Approach
Expand | ||
---|---|---|
| ||
Before you begin the development of your browser-based application, contact USTA to discuss what data you will need to access from USTA. Credentials will be issued for use to connect via HTTP. Credentials:
USTA Admin will register your application as a client in the Cognito configuration. |
Expand | ||
---|---|---|
| ||
Add a link in the form of: https://stage-account.usta.com /login? When the token for the authorized customer is needed Client API application needs to follow typical OAuth 2.0 flow using authorization code grant type. To perform such flow Client API should be registered in the USTA authentication service and should have valid:
To perform login as a customer, API Client application should follow such steps:
|
Add Logic to Client Secure Landing Page
Expand | ||
---|---|---|
| ||
When valid credentials are provided then the browser is redirected to {callbackUri} with code={authorizationCode} param in the url |
Expand | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||
USTA recommends naming cookies based on the client id. Cookies should also be stored on the subdomain level (i.e. subdomain.usta.com). Cookies should not be stored on usta.com domain as cookie collisions can occur and may be overwritten in unexpected ways. |
Expand | ||||
---|---|---|---|---|
| ||||
Option 1: You may check for the existence of the “uaid” key in the ID token. If this field exists and is populated, then the hybris profile exists and the Light Weight Registration was already completed. More information can be found here. Option 2: Call /customers/me endpoint and check validation errors:
|
Expand | ||
---|---|---|
| ||
Customers can create a USTA profile there, by filling-out basic, mandatory data. When a customer clicks the “Register” button and all data is valid then the browser is redirected back to the passed redirectUri and access_token can be used against services. |
Info |
---|
The Lightweight registration screen will perform USTA validations including duplicate account check as part of its functionality. |
Working with JWT Tokens
JWT tokens are encrypted JSON format and contain fields called claims. Once you generate an Access Token, you can examine the contents at http://jwt.io . This is a valuable debugging tool.
Panel | ||
---|---|---|
| ||
On This Page: |
Table of Contents |
---|