How do I clear cookies on Expo AuthSession.startAsync on Android

别来无恙 提交于 2021-01-04 13:59:27

问题


I am running into issues on Android where I can not get back to the login screen for external logins when using AuthSessions.startAsync once I am signed in.

This allows me in once, but then I always just get logged straight back in again rather than being prompted for which account to log in with.

I have no need with my app to eject, so I really do not want to unless I really have to.

I've read from the following link that this is possible.

https://medium.com/@manoj_makkuboy/clear-cookies-in-react-native-expo-without-ejecting-8cc964c0a4b7

By running this code:

var RCTNetworking = require("RCTNetworking");
RCTNetworking.clearCookies(() => {});

This seems to work on IOS (Which doesn't have the same issue), but not on Android, on Android clearCookies is undefined, although the RCTNetworking is bringing back something.

Does anyone have any idea how I can overcome this issue?

currently i'm using

"expo": "^32.0.5" and "react-native": "https://github.com/expo/react-native/archive/sdk-31.0.1.tar.gz"

来源:https://stackoverflow.com/questions/55405829/how-do-i-clear-cookies-on-expo-authsession-startasync-on-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!