https://github.com/vishwa-karthik/passwordless-validator
A simple password-less authenticator via Magic-Link using flutter and dart
https://github.com/vishwa-karthik/passwordless-validator
dart flutter magic-link
Last synced: about 1 month ago
JSON representation
A simple password-less authenticator via Magic-Link using flutter and dart
- Host: GitHub
- URL: https://github.com/vishwa-karthik/passwordless-validator
- Owner: Vishwa-Karthik
- Created: 2022-04-25T09:35:44.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-04-25T09:43:51.000Z (about 4 years ago)
- Last Synced: 2025-06-03T11:30:39.768Z (about 1 year ago)
- Topics: dart, flutter, magic-link
- Language: Dart
- Homepage:
- Size: 116 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Password Less Validation
## A simple Flutter password-less authenticator using [Magic Link](https://magic.link/)
## Installation
Add Magic_sdk to your pubspec.yaml
```dart
dependencies:
flutter:
sdk: flutter
magic_sdk: ^0.5.0
```
## Add Dependencies
```dart
import 'package:magic_sdk/magic_sdk.dart';
```
## Create SDK instance
Head over to Magic Link to save your public key API. We will call this "TOKEN"
```dart
void main() {
Magic.instance = Magic('YOUR API TOKEN');
}
```
### Use Stack in the top level and add Magic.instance.relayer to the children of Stack to ensure the best performance.
```dart
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Stack(children: [ // Use Stack() here
MaterialApp(
title: 'Magic Demo',
home: const LoginPage(),
),
Magic.instance.relayer // Insert Magic relayer here
]));
}
}
```
## Head over to [Flutter Docs](https://magic.link/docs/login-methods/email/integration/flutter) to have better insights.