flutter_twitch_auth 0.0.1 icon indicating copy to clipboard operation
flutter_twitch_auth: ^0.0.1 copied to clipboard

Add a Twitch login modal to your app and provide integration with Twitch endpoints using the Flutter Twitch package.

flutter_twitch_auth #

pub package

This package will provide a modal login with Twitch, you can get the "code" provided by the Twitch API to create your own authentication flow or get a user object once authentication is complete.

Created by Claudio Oliveira (https://twitter.com/cldlvr)

Buy me a coffee ☕

Live Example

Add dependency #

dependencies:
  flutter_twitch_auth: ^0.0.1 #latest version

Easy to use #


// Initialize authentication with your app on the Twitch API

void main() {

  FlutterTwitchAuth.initialize(
    twitchClientId: "<YOUR_CLIENT_ID>",
    twitchClientSecret: "<YOUR_CLIENT_SECRET>",
    twitchRedirectUri: "<YOUR_REDIRECT_URI>",
  );

  runApp(MyApp());
}

...

//Show modal and get logged user data
void _handleTwitchSignIn() async {
  User? user = await FlutterTwitchAuth.authToUser(context);
}

//Or get the user code and use it with the Twitch API (or Flutter Twitch Package) to create your own login flow.
void _handleTwitchSignIn() async {
  String? code = await FlutterTwitchAuth.authToCode(context);
}
...

4
likes
120
pub points
59%
popularity

Publisher

unverified uploader

Add a Twitch login modal to your app and provide integration with Twitch endpoints using the Flutter Twitch package.

Homepage
Repository (GitHub)

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

Dependencies

flutter, flutter_twitch, webview_flutter

More

Packages that depend on flutter_twitch_auth