mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-24 20:37:55 +00:00
Initialized Auth pages for future work
Implemented Login functionality
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import 'dart:convert';
|
||||
|
||||
String decodeBase64(String str) {
|
||||
//'-', '+' 62nd char of encoding, '_', '/' 63rd char of encoding
|
||||
String output = str.replaceAll('-', '+').replaceAll('_', '/');
|
||||
switch (output.length % 4) {
|
||||
// Pad with trailing '='
|
||||
case 0: // No pad chars in this case
|
||||
break;
|
||||
case 2: // Two pad chars
|
||||
output += '==';
|
||||
break;
|
||||
case 3: // One pad char
|
||||
output += '=';
|
||||
break;
|
||||
default:
|
||||
throw Exception('Illegal base64url string!"');
|
||||
}
|
||||
|
||||
return utf8.decode(base64Url.decode(output));
|
||||
}
|
||||
@@ -2,4 +2,8 @@ abstract class Constants {
|
||||
static const String languageCode = "en";
|
||||
|
||||
static const String countryCode = "US";
|
||||
|
||||
static const double defaultPadding = 16.0;
|
||||
|
||||
static const String tokenKey = 'userToken';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user