Flutter SSO SDK integration in flutter project
To integrate the "Flutter SSO SDK" in flutter project for both Android and IOS follow the steps:
Step 1: Add the dependency in pubspec.yaml file and click get pub to update the dependency
Dependency name: flutter_sso_sdk: ^1.0.1
Step 2: Make an "assets" folder and create a subfolder in the "assets" folder with the name "privateKey" and paste the private_key inside "privateKey" folder.
# To add "private_key" to your application, add an assets section in "pubspec.yaml", like this:
assets:
- assets/privateKey/private_key
Step 3: Write the code where you want to start the Flutter SSO SDK
EdugorillaSSO.initializeBaseUrl("Portal URL", 'assets/privateKey/private_key');
// Create a Map to represent the user_info JSON object
Map<String, dynamic> userInfo = {
'name': "User Name",
'email': "User Email id",
'mobile': "user mobile number", // mobile number should not more than 10 digits
};
// Convert the Map to a JSON string
String userInfoJson = json.encode(userInfo);
EdugorillaSSO.encryptUrlAndOpenWebView(context, userInfoJson.toString(), "/");
Congratulation Your integration is finished, Enjoy the new Experience.