flutter_login_yandex_updated 0.0.6 copy "flutter_login_yandex_updated: ^0.0.6" to clipboard
flutter_login_yandex_updated: ^0.0.6 copied to clipboard

Flutter plugin for authorization with Yandex LoginSDK for iOS and Android

flutter_login_yandex #

! Originaly by spChief !
Flutter plugin for authorization with Yandex LoginSDK for iOS and Android

Getting Started #

  1. add flutter_login_yandex to your pubspec.yaml file
  2. Register Yandex OAuth application, see official docs
  3. Setup android
  4. Setup ios

YandexLoginSDK version in plugin: #

  • iOS: 3.0.1
  • Android: 2.5.1

Minimum requirements #

  • IOS 12.0
  • ANDROID minSdkVersion 21

SDK documentation #

Android setup #

Add to your android/app/build.gradle default section this with replacement of yourClientId to Yandex OAuth app client id:

manifestPlaceholders += [YANDEX_CLIENT_ID:"yourClientId"]

It must looks like this:

defaultConfig {
    applicationId "com.example.flutter_login_yandex_example"
    minSdkVersion flutter.minSdkVersion
    targetSdkVersion flutter.targetSdkVersion
    versionCode flutterVersionCode.toInteger()
    versionName flutterVersionName
    manifestPlaceholders += [YANDEX_CLIENT_ID:"yourClientId"]
}

iOS setup #

Add this to your app Info.plist and replace "yourCientId" with Yandex client id from OAuth application

	<key>LSApplicationQueriesSchemes</key>
	<array>
		<string>primaryyandexloginsdk</string>
		<string>secondaryyandexloginsdk</string>
	</array>
	<key>YAClientId</key>
	<string>yourClientId</string>
	<key>CFBundleURLTypes</key>
	<array>
		<dict>
			<key>CFBundleURLName</key>
			<string>YandexLoginSDK</string>
			<key>CFBundleURLSchemes</key>
			<array>
				<string>yxyourClientId</string>
			</array>
		</dict>
	</array>

Also you need to set up Entitlements, add Capability: Associated Domains and enter domain with replaced yourClientId to your value:

applinks:yxyourClientId.oauth.yandex.ru

Usage #

final flutterLoginYandexPlugin = FlutterLoginYandex();
final response = await _flutterLoginYandexPlugin.signIn();
saveToken(response['token'] as String);
1
likes
140
pub points
30%
popularity

Publisher

unverified uploader

Flutter plugin for authorization with Yandex LoginSDK for iOS and Android

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on flutter_login_yandex_updated