Add Passage

Add Passage to your Flutter app

Prerequisites

If you don’t already have a Flutter project and just want to try out Passage, consider cloning our Flutter Example App.

Install

Install Passage Flutter:

flutter pub add passage_flutter

Import

import 'package:passage_flutter/passage_flutter.dart';

If you have a web app, add this script to your web/index.html headers:

<script type="module">
    import { Passage } from 'https://cdn.passage.id/passage-js.js';
    window.Passage = Passage;
</script>

Next Steps

Android configuration

Follow the Android cross platform configuration guide.

iOS configuration

Follow the iOS cross platform configuration guide.

Web app configuration

When you're running the web app locally you'll want to make sure your Passage app auth origin and Flutter web app port (opens in a new tab) are set to the same localhost.