Epic: SM-39 - ONB: Get secure access to the application Done
Jira US: SM-2582 - Logout during onboarding - close the application Done

User story:  
As a customer I want to close the application and come back later to complete onboarding.

Role: Customer

Objective: To close the application properly, when the Customer decides to leave and notify the Customer about the potential impact of leaving the onboarding process.

Reason: Customer needs to have an option to logout from anywhere in the app if not using the app, while all security and app closing measures must take place (e.g. clearing all existing Localstorage Hive, unsubscribe from all Ably channels, unlink Device from Ably)

Functional requirements:
There are two stages, wherein the logout can be initiated:

  1. Before finishing sign up
    - whole progress is lost,
    - the user needs to start from scratch,
    - IAM Logout service is not accessible
    - a dialogue window type 1 pops up

  2. After sign up
    - whole progress is saved
    - the user can continue from the finished stage of the onboarding process
    - IAM Logout service is accessible as this is the registered customer that is logged in (Logout from app )
    - a dialogue window type 2 pops up

UI requirements: 2 dialogue windows informing the customer about the impact of quitting the onboarding process and asking for confirmation from the customer.

Process flow: N/A

Execution steps:
See Functional requirements

Internal dependencies: FE, BE

External dependencies: IAM logout service

Alternative scenarios: N/A

Acceptance criteria:
See Functional requirements

Links to wireframes/UI: TBA