app/lib/data/auth.dart
2022-04-28 17:54:56 +07:00

11 lines
No EOL
294 B
Dart

import 'dart:convert';
String getSession(userId, sessionToken) {
var sessionData = {
"user_id": userId,
"session_token": sessionToken
};
var sessionRaw = jsonEncode(sessionData).toString();
var sessionEncoded = base64.encode(utf8.encode(sessionRaw));
return sessionEncoded;
}