vkid_flutter_sdk 1.0.2
vkid_flutter_sdk: ^1.0.2 copied to clipboard
VK ID SDK for Flutter is the most comprehensive library for user authentication via VK ID, officially supported by VK.
vkid_flutter_sdk #
VK ID SDK for Flutter is the most comprehensive library for user authentication via VK ID, officially supported by VK.
The SDK includes an API for OAuth 2.1 authorization, allows integration of VK ID elements, including one tap login buttons using VK, Mail and OK accounts as well as popups with similar functionality, and enables access to user data.
Requirements #
- Flutter version
3.10.6
or later - Dart version matching Flutter version
3.0.6
or later
Make sure to also check the platform-specific limitations.
Android #
Android SDK
21
or laterJava
11
or laterKotlin
2.0.20
or later
iOS #
iOS
12.0
or laterSwift
5.9
or laterXcode
15.2
or later
SDK installation #
Run the following command:
flutter pub add vkid_flutter_sdk
This will add the following text to your pubspec.yaml:
dependencies:
vkid_flutter_sdk: 1.0.2
You can also manually add the provided text to your pubspec.yaml without running the flutter pub add
command.
Documentation #
Demo #
Install Flutter #
https://docs.flutter.dev/get-started/install
Change the Flutter version
cd /your/path/to/flutter
git checkout 3.10.6
flutter --version
iOS SPM usage
if you are using SPM for development you need to use Flutter version 3.24 or higher.
cd /your/path/to/flutter
git checkout 3.24
flutter --version
To turn on SPM using:
flutter config --enable-swift-package-manager
To disabe SPM:
flutter config --no-enable-swift-package-manager
Download the project and run the demo #
- Check that all necessary Flutter components are installed.
flutter doctor
- View the list of available emulators and simulators.
flutter emulators
- Create an emulator or simulator if none are available.
flutter emulators --create --name example_emulator
- Launch the emulator or simulator.
flutter emulators --launch example_emulator
- Add parameters for sample.
Android:
Add the following to the example/android/local.properties
file:
VKIDClientSecret=YOUR_CLIENT_SECRET
VKIDClientID=YOUR_CLIENT_ID
iOS:
Add the following to the example/ios/AppCredentials.xcconfig
file:
VK_APP_CLIENT_ID=YOUR_CLIENT_ID
VK_APP_CLIENT_SECRET=YOUR_CLIENT_SECRET
YOUR_CLIENT_SECRET and YOUR_CLIENT_ID are data generated in the VK ID authorization service when creating an app. They are stored there as well, in the App section.
- Install iOS dependencies.
Cocoapods
For installing cocoapods dependencies use:
flutter pub get
cd example/ios
pod install --repo-update
cd ../../
SPM
For using SPM
flutter pub get
If you were using Cocoapods previously, we recommend you to clean 'Pods' folder to prevent issues that may occur.
rm -r example/ios/Pods
- Run the demo in the example directory.
cd example
flutter run