react-native-azure-auth
react-native-azure-auth copied to clipboard
ClearSession WebView iOS error when closing
Hi,
I am facing the same problem as mentioned in this issue: #122
I know this issue was closed, because the issue seemed to be resolved, but it was only resolved for Android. In iOS when i use azureAuth.webAuth.clearSession()
to log the user out, it opens the WebView, logs the user out correctly, but then it doesn't close the WebView, even if I set closeOnLoad: true
. If i then click the cancel/X - Button to close the WebView, it gives me the error: aa.session.user_cancelled
. Since i get an error, the function i want to execute after (in the .then() call of the promise) isn't being executed and the user stays on the same screen, even tho I want to change screen after the logout.
Has anybody found a workaround for this or is there a way to fix this?
This is my function:
function logout() {
azureAuth.webAuth
.clearSession({ closeOnLoad: true })
.then(() => {
//send user to different screen when logout done successfully
onSuccessfulLogout()
})
.catch(error => console.log(error))
}
Hi, I have same problem with this.
I was wondering problem isn't about closeOnLoad
param. Promise clearSession doesn't end. If you close safari/chrome tab, goes to catch handler
@vmurin could you give more information about that?
Same here! @vmurin