Captain is currently in ALPHA. We are happy to get your feedback
Core API
Helpers Utils Handle Deep Link

Module: helpers/utils/handle-deep-link

Table of contents

Functions

Functions

handleDeepLink

handleDeepLink(url): void

Handles a deep link URL by parsing it to extract the access_token parameter. The function logs the access token and saves it to a key store.

Parameters

NameTypeDescription
urlstringThe URL received from the custom protocol handler. This URL is expected to contain an access_token parameter. The function extracts the access_token from the URL's search parameters, logs it to the console, and then stores it using the keyStore service under the key captainCloud.accessToken. If the URL does not include an access_token or if it's null, the keyStore will be updated with a null value.

Returns

void

Example

handleDeepLink("captain-login://open?access_token=xyz123");

Defined in

src/electron/helpers/utils/handle-deep-link.ts:17 (opens in a new tab)