magic_ext_oidc 0.0.4 copy "magic_ext_oidc: ^0.0.4" to clipboard
magic_ext_oidc: ^0.0.4 copied to clipboard

A Magic oidc extension to support Magic login authentication

๐Ÿ”’ Magic Open Id Connect for Flutter #

<MagicLabs>

Magic Open Id Connect SDK extension for Flutter.

License ยท Changelog ยท Contributing Guide

๐Ÿ”— Installation #

Integrating your Flutter app with Magic will require our Flutter package and the OIDC extension:

# Via pub.dev:
flutter pub add magic_sdk
flutter pub add magic_ext_oidc

โšก๏ธ Quick Start #

Sign up or log in to the developer dashboard to receive API keys that will allow your Flutter application to interact with Magic's APIs.

Request access to this feature sending the API key you want enabled to our customer support.

In your Flutter app, typically in the login screen:

import 'package:magic_sdk/magic_sdk.dart';
import 'package:magic_ext_oidc/magic_ext_oidc.dart';

void main() {
  Magic.instance = Magic("YOUR_PUBLISHABLE_KEY");

  // Use the OIDC extension to perform login
  var didToken = await magic.openid.loginWithOIDC(OpenIdConfiguration(
    jwt: yourOpenIdJwt, // Aquired from your OpenID provider
    providerId: yourMagicProviderId, // Aquired from Magic, please contact support for this id
  ));
  
  // Use the DID token for further authentication or requests
  print('DID Token: $didToken');
}
1
likes
130
points
78
downloads

Publisher

verified publishermagic.link

Weekly Downloads

A Magic oidc extension to support Magic login authentication

Homepage

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter, magic_sdk, webview_flutter

More

Packages that depend on magic_ext_oidc