Skip to content

Installation

pubspec.yaml
dependencies:
rakomi_flutter: ^0.1.0

Then fetch it:

Terminal window
flutter pub get

rakomi_flutter targets Dart SDK >=3.11.0 <4.0.0 and Flutter >=3.41.0. It supports iOS, Android, and Flutter Web.

Sign in to your tenant dashboard at https://dashboard.rakomi.comAPI keys panel → Create publishable key. Copy the pk_live_… (or pk_test_… for development) value — you pass it to RakomiProvider(publishableKey:).

Social sign-in (RakomiSignInButton, RakomiSignInForm’s provider buttons, or performSocialSignIn) opens the system browser and returns control to your app through a redirect URI you choose — for example myapp://callback. On mobile, that URI’s scheme must be a custom URL scheme, not http:///https://; the SDK rejects http, https, javascript, data, file, vbscript and about schemes on mobile at call time. On Flutter Web, an https:// redirect URI is used instead (popup postMessage flow).

Register the same scheme you pass to RakomiProvider(redirectUri:):

ios/Runner/Info.plist
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>your.app.bundle.id</string>
<key>CFBundleURLSchemes</key>
<array>
<!-- Replace `myapp` with the scheme you passed to RakomiProvider(redirectUri:). -->
<string>myapp</string>
</array>
</dict>
</array>
android/app/src/main/AndroidManifest.xml
<activity android:name=".MainActivity" android:launchMode="singleTask">
<intent-filter android:autoVerify="false">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Replace `myapp` with the scheme you passed to RakomiProvider(redirectUri:). -->
<data android:scheme="myapp" android:host="callback" />
</intent-filter>
</activity>

android:launchMode="singleTask" matters: without it, the OAuth callback can spawn a second instance of your activity instead of returning to the one that started the flow.

Wrap your app’s root widget in RakomiProvider and render RakomiSignInForm — if the form appears and a social-provider button returns you to the app after completing the browser flow, installation and the redirect scheme are both wired correctly. See Quick start for the minimal shape.

Continue to Configuration to wire RakomiProvider, or Authentication for the sign-in flows the SDK offers.