magic_ext_oidc 0.0.4 magic_ext_oidc: ^0.0.4 copied to clipboard
A Magic oidc extension to support Magic login authentication
๐ Magic Open Id Connect for Flutter #
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');
}