Auth0 Home Blog Docs

ClearSession not returning promise unless cancelled

I am using react native and copied the example login and logout. I can login successfully and get a token just fine. When I try to logout I am calling auth0.webAuth.clearSession() and I do get a promise back however I do not get a success from the promise. The ClearSession function calls a show method for the logout URL( The application screen shows the word “OK”. This is the html that is rendered from the logout URL. What I expected to get was a success response to the promise. Am I supposed to configure the logout endpoint to return the successful response to my promise?

Consequently The application is stuck at the ok screen with a cancel button available. If I click cancel the promise returns an error. Otherwise it seems stuck
How should I handle this?

I went from this
if (Platform.OS === ‘android’) {
this.setState({ accessToken: null });
} else {
.then(success => {
this.setState({ accessToken: null });
.catch(error => console.log(error));

to this

this.setState({ accessToken: null });
auth0 = new Auth0(credentials);

is my problem solved? because it sure feels like my problem is solved.