Skip to content

Commit 9fb42dc

Browse files
committed
Small Improvement.
1 parent 0e436b1 commit 9fb42dc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

auth/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ private function changeLocation(event:LocationChangeEvent):void
123123
{
124124
var location:String = webView.location;
125125
126-
if(location.indexOf("/__/auth/handler?code=") != -1 || location.indexOf("/__/auth/handler?state=") != -1 || location.indexOf("/__/auth/handler#state=") != -1){
126+
if(location.indexOf("/__/auth/handler?code=") != -1 || location.indexOf("/__/auth/handler?state=") != -1 || location.indexOf("/__/auth/handler#state=") != -1 && location.indexOf("error") == -1){
127127
128128
//We are looking for a code parameter in the URL, once we have it we dispose the webview and prepare the last URLRequest
129129
webView.removeEventListener(LocationChangeEvent.LOCATION_CHANGE, changeLocation);

examples/FederatedExample.mxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
{
5353
var location:String = webView.location;
5454
55-
if(location.indexOf("/__/auth/handler?code=") != -1 || location.indexOf("/__/auth/handler?state=") != -1 || location.indexOf("/__/auth/handler#state=") != -1){
55+
if(location.indexOf("/__/auth/handler?code=") != -1 || location.indexOf("/__/auth/handler?state=") != -1 || location.indexOf("/__/auth/handler#state=") != -1 && location.indexOf("error") == -1){
5656
5757
//We are looking for a code parameter in the URL, once we have it we dispose the webview and prepare the last URLRequest
5858
webView.removeEventListener(LocationChangeEvent.LOCATION_CHANGE, changeLocation);

0 commit comments

Comments
 (0)