Downloadable Asset: 
Asset Version: 
1.0.1
Asset Description: 
Amway ID supports cases where you need to transfer from the native experience over to a website (like Hybris). The solution allows a very loose coupling between the native app and the destination site that is being opened, allowing both applications to operate independently without one having to build any special logic to support the SSO use case.
Details: 

<p>Component documentation fix</p>
<br/><p><strong>1 Overview</strong></p>

<p>Amway ID supports cases where you need to transfer from the native experience over to a website (like Hybris).&nbsp; The solution allows a very loose coupling between the native app and the destination site that is being opened, allowing both applications to operate independently without one having to build any special logic to support the SSO use case.</p>

<p>The approach from Amway ID is to follow the use of in-app browser tabs (aka "custom browser tabs") to present the Amway ID application to the user. This offers a number of benefits over other alternate approaches such as WebViews and native login forms. The advantages are:</p>

<ul>
<li>Single Sign-On across native apps using the in-app browser tabs</li>
<li>Improved security where individual applications are not collecting user credentials</li>
<li>Reduced risk surface area to protect</li>
<li>Consistent login experience for end-users</li>
</ul>

<p><strong>2 Getting Started with the&nbsp;AmwayID NativeWebSSO Login&nbsp;component</strong></p>

<p>This is a Getting Started section for the&nbsp;AmwayID NativeToWebSSO Login. It contains information about importing and running the component.</p>

<p>For information about the&nbsp;Dynamic Usage, Properties, Events, and APIs of the component, you can visit the&nbsp;Reference Section.</p>

<p>Before you start using the&nbsp;NativeToWebSSO&nbsp;component, make sure that you meet all the requirements in the&nbsp;Prerequisites.</p>

<p><strong>3 Prerequisites</strong></p>

<ul>
<li>A&nbsp;<a href="https://manage.kony.com/">Kony account</a></li>
<li>Kony Visualizer V8 SP4, or higher</li>
<li>Create a Client App at AmwayID</li>
<li>Update <a href="cid:sso">cid:sso</a> scope</li>
</ul>

<p>Before you can begin, there are a few pieces of setup required to implement this solution:</p>

<ol>
<li>A member of the Amway ID team must allow the&nbsp;cid:sso&nbsp;scope for your application's client ID.&nbsp; By default, this scope is not enabled for your application; you must specifically request that it be added.</li>
<li>A member of the Amway ID team must whitelist the domain where your native app is going to SSO into.</li>
<li>Endpoint URL&nbsp;- You will need to work with a technical member of the target website team to determine the correct Endpoint SSO URL, and that it has been set up to accept this call.</li>
</ol>

<p>After these two steps are completed, the native app is able to use native-to-web SSO.&nbsp; To do so, when the native app is ready to open another website, the native app must open a browser and within the browser post a valid access token to the /v1/sso endpoint of Amway ID.</p>

<p><strong>3.1 Source Code</strong></p>

<p>The component source can be found at&nbsp;<a href="https://github.com/AmwayACS/AmwayIDNativeLogin">https://github.com/Amway...

<p><strong>4 Importing the Component</strong></p>

<p>Before you start importing the component to Kony Visualizer, you must download the component from the&nbsp;Amway Marketplace&nbsp;website. You can import the marketplace components only into the apps that are of the Kony Reference Architecture type.</p>

<p>To import the AmwayID NativeWebSSO component, do the following:</p>

<ol>
<li>Open your app project in Kony Visualizer.</li>
<li>On the&nbsp;File&nbsp;menu, point to&nbsp;Import, and click&nbsp;Component to Library. The&nbsp;Open&nbsp;dialog appears.</li>
<li>Navigate to the location where you downloaded the component (zip file) on your computer, select the component, and click&nbsp;Open. After Visualizer downloads the component, it opens a window that asks you to enter the metadata for the component.</li>
</ol>

<p>Enter a&nbsp;Library Name, a&nbsp;Collection Name, and a&nbsp;Description&nbsp;if you require one.</p>

<ul>
<li><strong>Library Name&nbsp;-</strong> A Library contains component collections and skins. The Library Name specifies the library that you want to import the component into. If the library does not exist, Visualizer will create a new one.<br />
As an example, let us name the Library as&nbsp;<strong>AmwayID</strong>.</li>
<li><strong>Collection Name&nbsp;-</strong> A collection contains multiple components. The Collection Name specifies the collection that you want to import the component into. If the collection does not exist in the specified library, Visualizer will create a new one.<br />
As an example, let us name the Collection as&nbsp;<strong>Login</strong>.</li>
<li><strong>Component Name</strong>&nbsp;- This name specifies the display name you want to use for the component in Visualizer.<br />
By default, the component name is&nbsp;<strong>com.alticor.NativeWebSSO</strong>&nbsp;.</li>
<li>After you import the component, you can drag and drop it from the Collection Library onto your form.</li>
<li>Save the form now.</li>
</ul>

<p>After you add the component to a form, you need to configure the native settings of your project. You can refer to the following sections for more information.</p>

<p><strong>4.1 Configuring Component Properties</strong></p>

<p>You can use a component's Properties to customize and configure the elements. These elements can be UI elements, service parameters, and so on. For more information about properties, you can refer to the&nbsp;<a href="https://docs.kony.com/konylibrary/visualizer/visualizer_user_guide/Defau... target="_blank">Components Overview</a>&nbsp;section of the Visualizer User Guide.</p>

<p>You can set the properties from the&nbsp;<strong>Properties</strong>&nbsp;panel on the right side of Visualizer. You can also configure these properties using JavaScript code.</p>

<p><strong>4.2 Setting Properties</strong></p>

<p><strong>Auth Token</strong></p>

<p><strong>&nbsp; &nbsp; &nbsp;Description:</strong>&nbsp;The active access token that contains the&nbsp;<strong>cid:sso</strong>&nbsp;scope.</p>

<p><strong>&nbsp; &nbsp; Syntax:</strong>&nbsp;authToken</p>

<p><strong>&nbsp; &nbsp; Type:</strong>&nbsp;String</p>

<p><strong>&nbsp; &nbsp; Read/Write:</strong>&nbsp;Write</p>

<p><strong>&nbsp; &nbsp; Example:</strong>&nbsp;this.view.nativeWebSSO.accessToken = response.access_token;</p>

<p><strong>Redirect URI</strong></p>

<p><strong>&nbsp; &nbsp; &nbsp;Description:</strong>&nbsp;The destination URI where the native app is going to single sign on into.</p>

<p><strong>&nbsp; &nbsp; Syntax:</strong>&nbsp;redirectUri</p>

<p><strong>&nbsp; &nbsp; Type:</strong>&nbsp;String</p>

<p><strong>&nbsp; &nbsp; Read/Write:</strong>&nbsp;Write</p>

<p><strong>&nbsp; &nbsp; Example:</strong>&nbsp;this.view.nativeWebSSO.redirectUri = "https://qa.amway.com/session/redirect?url=https://qa.amway.com";</p>

<p><strong>Client App</strong></p>

<p><strong>&nbsp; &nbsp; Description:</strong>&nbsp;The clientapp identifier of the&nbsp;<strong>destination</strong>&nbsp;application. Do not use the native app's&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;clientapp here; instead, use the clientapp used by the application you are going to.</p>

<p><strong>&nbsp; &nbsp; Syntax:</strong>&nbsp;clientApp</p>

<p><strong>&nbsp; &nbsp; Type:</strong>&nbsp;String</p>

<p><strong>&nbsp; &nbsp; Read/Write:</strong>&nbsp;Write</p>

<p><strong>&nbsp; &nbsp; Example:</strong>&nbsp;this.view.nativeWebSSO.clientApp = "HybrisWebsiteUS";</p>

<p><strong>End point URL</strong></p>

<p><strong>&nbsp; &nbsp; &nbsp;Description:</strong>&nbsp;Note that you will need to work with the target website to determine the correct SSO URL, and that it has been set up to accept this call.</p>

<p><strong>&nbsp; &nbsp; &nbsp;Syntax:</strong>&nbsp;endPointURL</p>

<p><strong>&nbsp; &nbsp; &nbsp;Type:</strong>&nbsp;String</p>

<p><strong>&nbsp; &nbsp; &nbsp;Read/Write:</strong>&nbsp;Write</p>

<p><strong>&nbsp; &nbsp; &nbsp;Example:</strong>&nbsp;this.view.nativeWebSSO.endPointURL = "https://account-amerreg-qa.amwayglobal.com/v1/sso";</p>

<p><strong>Sample code snippet to set properties through programmatically.</strong></p>

<p>invokeNativeWebSSO : function(){</p>

<p>this.view.nativeWebSSO.accessToken = response.access_token;</p>

<p>this.view.nativeWebSSO.redirectUri = "https://qa.amway.com/session/redirect?url=https://qa.amway.com";</p>

<p>this.view.nativeWebSSO.endPointURL = "https://account-amerreg-qa.amwayglobal.com/v1/sso";</p>

<p>this.view.nativeWebSSO.clientApp = "HybrisWebsiteUS";</p>

<ul style="list-style-type:circle">
<li>&nbsp;</li>
</ul>

<p>this.view.nativeWebSSO.isVisible = true;</p>

<p>},</p>

<p><strong>4.3&nbsp;<a href="javascript:void(0);">Building and Running your app</a></strong></p>

<p>After performing all the above steps, you can perform either of the following tasks:</p>

<p>Build and Publish your app&nbsp;(Visualizer Enterprise)</p>

<p>For more information, you can refer to the&nbsp;<a href="http://docs.kony.com/konylibrary/visualizer/visualizer_user_guide/Defaul... target="_blank">Building and Viewing an Application</a>&nbsp;section of the Visualizer User Guide.</p>

<p><strong>5 APIs</strong></p>

<p><strong>5.1 setHTMLContent</strong></p>

<p><strong>&nbsp; &nbsp; Description:</strong>&nbsp;Invokes SSO code snippet from native to web SSO.</p>

<p><strong>&nbsp; &nbsp; Syntax:</strong>&nbsp;setHTMLContent()</p>

<p><strong>&nbsp; &nbsp; Parameters:</strong>&nbsp;None.</p>

<p><strong>&nbsp; &nbsp; Return Value:</strong>&nbsp;None.</p>

<p><strong>&nbsp; &nbsp; Example:</strong>&nbsp;this.view.nativeWebSSO.setHTMLContent();</p>

<p><strong>6 External Links</strong></p>

<p>Please find the <strong>confluence</strong> link <a href="https://jira.amway.com:8444/display/GIW/Native+to+Web+SSO+Component">her...

Supported App Types: 
Supported Devices: 
Supported Platforms: 
Platform Version: 
Asset Requirements: 
Visualizer Enterprise
MobileFabric
Status: 
Approved
Title Approved: 
Title Review: 
Body Approved: 
Body Review: 
Asset Display View Approved: 
Asset Display View Review: 
Detail View Images/Video Approved: 
Detail View Images/Video Review: 
Developers Guide Documentation Approved: 
Developers Guide Documentation Review: 
Additional Notes: 
Asset Review Status: 
Approved
Use iPhone Wrapper: 
Use iFrame: 
Item Guid: 
e0ae68d086fd4aa59ce865cc398476ea
Item Kuid: 
u9eb88f6df934083b2c29168dd397032
Is NFI: