I need do logout from expo using AuthSession for auth0

Please provide the following:

  1. SDK Version:42
  2. Platforms(Android/iOS/web/all):android emulator
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

I m using this for login

when I did logout, but it doesnt clean the auth0 cookies,

logOut = () => {

    fetch(https://XXXXXXXX.com/v2/logout"; + '?client_id=' + clientId,

        {

            method: "GET"

        })

        .then((response) => response.text())

        .then((data) => {

            console.log("-- LOG OUT SUCCESS --");

            console.log(data);

            //return data;

        }).catch((error) => {

            console.log("--LOG OUT ERROR --");

            console.error(error);

        });

Hello @xmazzuce,

I currently have the same problem but I have found a a temporary solution by using the WebBrowser (expo-web-browser).

WebBrowser.openAuthSessionAsync('https://YOUR_DOMAIN/v2/logoutclient_id=YOUR_CLIENT_ID&returnTo=LOGOUT_URL', 'redirectUrl')

Hope it can help if you haven’t found a better solution.

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.