Flutter β Sign in with Device
Cotter's Passwordless SDK authenticates your user based on their device. It allows a seamless, fast, and secure way for your user to login to your React Native App.
Sign in with Device
dependencies:
cotter:import 'package:cotter/cotter.dart'; // Import Cotter
class HomePageState extends State {
...
// 1β£ Initialize Cotter
Cotter cotter = new Cotter(apiKeyID: API_KEY_ID); // π Specify your API KEY ID here
// 2οΈβ£ Sign Up Function
void signUp() async {
try {
// π One-line Sign Up
var user = await cotter.signUpWithDevice(identifier: inputController.text);
} catch (e) {
print(e)
}
}
// 3οΈβ£ Login Function
void login(BuildContext context) async {
try {
// π One-line Login
var event = await cotter.signInWithDevice(identifier: inputController.text, context: context);
} catch (e) {
print(e)
}
}
@override
Widget build(BuildContext context) { ... }
} π That's It!

What's Next?
Authenticate from a Non-Trusted Device2. Getting the Logged-in User
Getting the Logged-in User3. Getting Access Token, ID Token, and Refresh Token
Getting OAuth TokensLast updated