Code Monkey home page Code Monkey logo

zitadel_flutter's Introduction

zitadel_flutter

This project is a starting point for a Flutter application with ZITADEL integration.

Deploy your own

Deploy with Vercel

To deploy your page with vercel, set your build command to

flutter build web

output directory is

build/web

install command is

if cd flutter; then git pull && cd .. ; else git clone https://github.com/flutter/flutter.git; fi && ls && flutter/bin/flutter doctor && flutter/bin/flutter clean && flutter/bin/flutter config --enable-web

then ensure webCallbackUrlScheme in main.dart is set to your deployed site and add your redirect uri in ZITADEL console. It should look like this https://your-site.com/auth.html.

Getting Started

This project is a starting point for a Flutter application with ZITADEL integration.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

ZITADEL configuration

Make sure to create a native application. Add the redirects for mobile applications with your custom scheme (in our case com.zitadel.zitadelflutter) and your web redirect (in our case for local development http://localhost:4444/auth.html) and make sure to have enabled devMode. To get a refresh_token, check the checkbox for Refresh Token and add the offline_access scope.

Copy your instance url and your clientId and set it in lib/main.dart.

Run

Android

Navigate to your AndroidManifest.xml and add the following activity with your scheme.

<activity
    android:name="com.linusu.flutter_web_auth_2.CallbackActivity"
    android:exported="true">
    <intent-filter android:label="flutter_web_auth_2">
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="[callback-url-scheme]" /> <!-- ex: com.example.zitadelflutter -->
    </intent-filter>
</activity>

then connect your device or run a simulator and run your application.

iOS

Make sure to connect your iPhone or run the simulator, then type

flutter run -d iphone

Web

To run this example in your browser, make sure to run it on port 4444.

flutter run -d chrome --web-port=4444

zitadel_flutter's People

Contributors

peintnermax avatar vfasteng 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.