Skip to content

[patch] [Feature]: Mobile onboarding phase 1#1697

Draft
juan-arias wants to merge 6 commits intodevfrom
jarias/onboarding-phase1
Draft

[patch] [Feature]: Mobile onboarding phase 1#1697
juan-arias wants to merge 6 commits intodevfrom
jarias/onboarding-phase1

Conversation

@juan-arias
Copy link
Member

Proposed changes

  • Read/Write onboarding status
  • Redirect to broker app if user returns to app before authentication is complete.

Type of change

  • Feature work
  • Bug fix
  • Documentation
  • Engineering change
  • Test
  • Logging/Telemetry

Risk

  • High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
  • Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
  • Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

Additional information

This pull request introduces new onboarding status functionality to the project by adding the MSIDOnboardingStatus and MSIDOnboardingStatusCache classes, along with their associated tests and integration into the Xcode project. Additionally, a new broker constant is defined. These changes enable the caching and retrieval of onboarding status information, supporting future onboarding-related features.

New Onboarding Status Feature:

  • Added MSIDOnboardingStatus and MSIDOnboardingStatusCache classes, along with their headers and implementation files, to manage onboarding status in the keychain. [1] [2] [3]
  • Integrated new onboarding status classes into the Xcode project file, including source and header references, and grouped them under a new onboarding group. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]
  • Added unit tests for both MSIDOnboardingStatus and MSIDOnboardingStatusCache to ensure correct functionality. [1] [2] [3]

Broker Constants:

  • Introduced a new broker constant, MSID_IGNORE_BROKER_REQUEST, in both the header and implementation files for use in broker request handling. [1] [2]

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds initial “mobile onboarding” support by persisting an onboarding status in the cache and enabling a broker-request replay if the app returns foreground before broker completion.

Changes:

  • Introduces MSIDOnboardingStatus + MSIDOnboardingStatusCache (keychain-backed) with unit tests.
  • Updates MSIDBrokerInteractiveController to write onboarding status, track the current broker request, and optionally replay the request with ignore_broker_request=1.
  • Adds MSID_IGNORE_BROKER_REQUEST broker constant and wires new files into the Xcode project.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
IdentityCore/src/controllers/broker/ios/MSIDBrokerInteractiveController.m Writes onboarding status, tracks current broker request, and replays broker invocation on “no response” foreground return.
IdentityCore/src/cache/onboarding/MSIDOnboardingStatus.h Defines onboarding status/reason model and string/enum helpers.
IdentityCore/src/cache/onboarding/MSIDOnboardingStatus.m Implements JSON serialization + default values for onboarding status/reason.
IdentityCore/src/cache/accessor/MSIDOnboardingStatusCache.h Declares cache API for onboarding status read/write/clear.
IdentityCore/src/cache/accessor/MSIDOnboardingStatusCache.m Implements keychain persistence and TTL enforcement for onboarding status.
IdentityCore/src/parameters/MSIDInteractiveRequestParameters.h Adds isReplayRequest flag to interactive request parameters.
IdentityCore/src/MSIDBrokerConstants.h Declares MSID_IGNORE_BROKER_REQUEST.
IdentityCore/src/MSIDBrokerConstants.m Defines MSID_IGNORE_BROKER_REQUEST.
IdentityCore/tests/integration/ios/MSIDBrokerInteractiveControllerIntegrationTests.m Adds integration tests covering onboarding status write, request clearing, and replay behavior.
IdentityCore/tests/MSIDOnboardingStatusTests.m Adds unit tests for onboarding status JSON parsing/roundtrip and helper mappings.
IdentityCore/tests/MSIDOnboardingStatusCacheTests.m Adds unit tests for cache TTL, ownership behavior, clear behavior, and field preservation.
IdentityCore/IdentityCore.xcodeproj/project.pbxproj Adds new onboarding source/test files to the Xcode project and build phases.

Copy link
Contributor

@Veena11 Veena11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some comments. Please check. Also some of the copilot review comments are good too, please address those

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants