
Introduction
- Connect is the client-side component that your users will interact with in order to link their accounts to Gandalf and allow you to access their data.
- Connect will handle credential validation, multi-factor authentication, and error-handling for every service that Gandalf supports. You can use Connect in any kind of application (web or mobile) - it’s as simple as just adding a link to your app.
- Connect is an App Clip & Instant App. These let users enjoy native app experiences without the need to download a full app. Learn more on Apple Developers & Android Developers
Connect Flow
The diagram below shows how Connect is used to obtain adataKey
, which is used server-side to request data.

- Open Connect for your users by navigating to the Connect URL. Pass your
publicKey
,redirectUrl
and the data source(s) you want to read data from. - After your user is done linking their account(s), Connect will navigate to your
redirectUrl
with a query parameter calleddataKey
. - This
dataKey
will be used to make requests to the Sauron API
Once your end-user signs into a data source like Netflix or Amazon, they won’t need to sign in again. Their session stays active, just like in a browser.
Connect Helper Package
We provide packages to make it easy to generate a valid Connect URL. The Connect helper handles parameter validations automagically!Install Using Swift Package Manager in Xcode
- Open your project in Xcode.
- Go to
File
>Add Packages...
. - Enter the repository URL:
https://github.com/gandalf-network/connect-ios-sdk.git
. - Choose the version rule (e.g., “Up to Next Major”) and click
Add Package
. - Select the GandalfConnect package for your target.
Or Update Package.swift
swift package update
to fetch the dependency.Usage
Import the package
Initialization
Create an instance ofConnectInput
with the necessary details:Connect
class:Generating URL
To generate a URL, call thegenerateURL
method:Get Data Key
After your user is done linking their accounts, Connect will navigate to yourredirectUrl
with a query
parameter called dataKey
.

dataKey
easily.
Alternatively, your redirectURL could be a server-side endpoint. You can get the
dataKey
directly
from your application’s server.