πŸ“ Bolt Help / Core Products / Embedded Accounts / Implement Login Status Component

Implement Login Status Component

After a shopper logs in via the authorization modal, this component displays their username and a Logout button. Clicking Logout clears all Bolt session tokens and cookies, logging the user out of their account, and hides the component.

1. Create the Login Status Component

const loginStatusComponent = boltEmbedded.create("login_status"));

2. Add the Component to HTML

Add a div to your webpage in the location where you want the login status component to appear. Style the div with the desired width and height.

<div id =”login-status” style={{ width: β€œ400px”, height: β€œ150px” }} />

3. Mount Login Status Component

Mount the login status component onto the new div.

loginStatusComponent.mount("#login-status");

Next Step

After you implement the Login Status Component, you will use the Bolt Account APIs to access Shopper Data for payment and shipping information of those shoppers with existing Bolt Accounts.

πŸ“–On This Page
Filter by Section
Filter by Topic