forked from firka/student-legacy
maybe finally fixed ios login problem (i hope so)
This commit is contained in:
parent
52b9b4f5db
commit
9adfe636d6
@ -25,26 +25,19 @@ class _KretenLoginScreenState extends State<KretenLoginScreen> {
|
|||||||
..setJavaScriptMode(JavaScriptMode.unrestricted)
|
..setJavaScriptMode(JavaScriptMode.unrestricted)
|
||||||
..setNavigationDelegate(NavigationDelegate(
|
..setNavigationDelegate(NavigationDelegate(
|
||||||
onNavigationRequest: (n) async {
|
onNavigationRequest: (n) async {
|
||||||
if (n.url.startsWith('https://mobil.e-kreta.hu') ||
|
if (n.url.startsWith('https://mobil.e-kreta.hu')) {
|
||||||
n.url.startsWith('https://idp.e-kreta.hu')) {
|
|
||||||
return NavigationDecision.navigate;
|
|
||||||
} else {
|
|
||||||
return NavigationDecision.prevent;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onPageStarted: (url) async {
|
|
||||||
setState(() {
|
setState(() {
|
||||||
loadingPercentage = 0;
|
loadingPercentage = 0;
|
||||||
currentUrl = url;
|
currentUrl = n.url;
|
||||||
});
|
});
|
||||||
|
|
||||||
// final String instituteCode = widget.selectedSchool;
|
// final String instituteCode = widget.selectedSchool;
|
||||||
if (!url.startsWith(
|
// if (!n.url.startsWith(
|
||||||
'https://mobil.e-kreta.hu/ellenorzo-student/prod/oauthredirect?code=')) {
|
// 'https://mobil.e-kreta.hu/ellenorzo-student/prod/oauthredirect?code=')) {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
List<String> requiredThings = url
|
List<String> requiredThings = n.url
|
||||||
.replaceAll(
|
.replaceAll(
|
||||||
'https://mobil.e-kreta.hu/ellenorzo-student/prod/oauthredirect?code=',
|
'https://mobil.e-kreta.hu/ellenorzo-student/prod/oauthredirect?code=',
|
||||||
'')
|
'')
|
||||||
@ -61,6 +54,41 @@ class _KretenLoginScreenState extends State<KretenLoginScreen> {
|
|||||||
// Navigator.of(context).pop();
|
// Navigator.of(context).pop();
|
||||||
// });
|
// });
|
||||||
// Navigator.of(context).pop();
|
// Navigator.of(context).pop();
|
||||||
|
|
||||||
|
return NavigationDecision.prevent;
|
||||||
|
} else {
|
||||||
|
return NavigationDecision.navigate;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onPageStarted: (url) async {
|
||||||
|
// setState(() {
|
||||||
|
// loadingPercentage = 0;
|
||||||
|
// currentUrl = url;
|
||||||
|
// });
|
||||||
|
|
||||||
|
// // final String instituteCode = widget.selectedSchool;
|
||||||
|
// if (!url.startsWith(
|
||||||
|
// 'https://mobil.e-kreta.hu/ellenorzo-student/prod/oauthredirect?code=')) {
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// List<String> requiredThings = url
|
||||||
|
// .replaceAll(
|
||||||
|
// 'https://mobil.e-kreta.hu/ellenorzo-student/prod/oauthredirect?code=',
|
||||||
|
// '')
|
||||||
|
// .replaceAll(
|
||||||
|
// '&scope=openid%20email%20offline_access%20kreta-ellenorzo-webapi.public%20kreta-eugyintezes-webapi.public%20kreta-fileservice-webapi.public%20kreta-mobile-global-webapi.public%20kreta-dkt-webapi.public%20kreta-ier-webapi.public&state=refilc_student_mobile&session_state=',
|
||||||
|
// ':')
|
||||||
|
// .split(':');
|
||||||
|
|
||||||
|
// String code = requiredThings[0];
|
||||||
|
// // String sessionState = requiredThings[1];
|
||||||
|
|
||||||
|
// widget.onLogin(code);
|
||||||
|
// // Future.delayed(const Duration(milliseconds: 500), () {
|
||||||
|
// // Navigator.of(context).pop();
|
||||||
|
// // });
|
||||||
|
// // Navigator.of(context).pop();
|
||||||
},
|
},
|
||||||
onProgress: (progress) {
|
onProgress: (progress) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user