Skip to content

Commit

Permalink
Update aad_b2c_webview.dart fixing redirect on iOS
Browse files Browse the repository at this point in the history
Use           onUrlChange instead of onPageFinished based on response from SzczygielDev microsoft#14 (comment)
  • Loading branch information
filip8600 committed Oct 16, 2023
1 parent b6468de commit 6d670a3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/src/presentation/aad_b2c_webview.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ class ADB2CEmbedWebViewState extends State<ADB2CEmbedWebView> {
// Update loading bar.
},
onPageStarted: (String url) {},
onUrlChange: (change) {
final Uri response = Uri.dataFromString(change.url!);
onPageFinishedTasks(change.url!, response);
},
onPageFinished: (String url) {
setState(() {
isLoading = false;
});

final Uri response = Uri.dataFromString(url);
//Check that the user is past authentication and current URL is the redirect with the code.
onPageFinishedTasks(url, response);
},
),
)
Expand Down

0 comments on commit 6d670a3

Please sign in to comment.