Skip to content

Commit

Permalink
Merge pull request #80 from auth0/bugfix-clear-session-resolve
Browse files Browse the repository at this point in the history
Call resolve on logout load
  • Loading branch information
hzalaz authored Aug 18, 2017
2 parents 0b6db63 + efc217f commit a17339a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ios/A0Auth0.m
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ - (void)safariViewControllerDidFinish:(SFSafariViewController *)controller {

- (void)safariViewController:(SFSafariViewController *)controller didCompleteInitialLoad:(BOOL)didLoadSuccessfully {
if (self.closeOnLoad && didLoadSuccessfully) {
[self terminateWithError:nil dismissing:YES animated:YES];
[self terminateWithError:[NSNull null] dismissing:YES animated:YES];
} else if (!didLoadSuccessfully) {
NSDictionary *error = @{
@"error": @"a0.session.failed_load",
Expand Down
6 changes: 5 additions & 1 deletion webauth/agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ export default class Agent {
Linking.addEventListener('url', urlHandler);
A0Auth0.showUrl(url, closeOnLoad, (err) => {
Linking.removeEventListener('url', urlHandler);
reject(err);
if (err) {
reject(err);
} else if (closeOnLoad) {
resolve();
}
});
});
}
Expand Down

0 comments on commit a17339a

Please sign in to comment.