GithubHelp home page GithubHelp logo

pass's Introduction

Passage logo

Example Flutter App with Passage Auth

🔑 The easiest way to get passkeys up and running for Flutter

Passage and the Passage Flutter SDK were built to make passkey authentication as fast, simple, and secure as possible. This example application is a great place to start. Before using Passage in your own Flutter app, you can use this example app to:

  • Plug in your own Passage app credentials to see passkeys in action
  • Learn basic implementation of the Passage Flutter SDK

A successful registration flow will look like this:

Passage Flutter Example

Requirements

  • Android Studio Electric Eel or newer
  • Xcode 14 or newer
  • A Passage account and Passage app (you can register for a free account here)
  • Completed setup of

Installation

flutter pub add passage_flutter

Configuration

To get this example Flutter app working with your Passage account/app, you'll need to swap out the placeholder authentication origin with your own. Learn more about Passage auth origins here.

iOS

You'll need to replace YOUR_AUTH_ORIGIN in the Associated Domains file (found here).

<plist version="1.0">
  <dict>
    <key>com.apple.developer.associated-domains</key>
    <array>
      <string>webcredentials:YOUR_AUTH_ORIGIN</string>
      <string>applinks:YOUR_AUTH_ORIGIN</string>
    </array>
  </dict>
</plist>

Android

In the strings.xml file (found here) replace YOUR_AUTH_ORIGIN with your app’s auth origin.

<resources>
    <!-- Required Passage app settings -->
    <string name="passage_auth_origin">YOUR_APP_ORIGIN</string>
    ...
</resources>

Web

When you're running the web app locally you'll want to make sure your Passage app auth origin and Flutter web app port are set to the same localhost.

Final step

Lastly, replace YOUR_APP_ID in the passage_state_container.dart file here.

_passage = PassageFlutter('YOUR_APP_ID');

🚀 Run the app!

If all of the configuration was setup correctly, you should be able to run this application in the simulator or a real device!

pass's People

Contributors

anwersafy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.