Giter Site home page Giter Site logo

Comments (9)

hungdev avatar hungdev commented on May 31, 2024 3

@jinguohao1991 @IcebergRage I know the reason. Due to the cookies library is not working and I'm trying to find a way to help you.
read more:
joeferraro/react-native-cookies#78
joeferraro/react-native-cookies#127
currently, temporary solution is disable cookies, but in some cases when logging back, we need to keep cookies, and users don't need to log in again.
So i still recommend persist cookies and clear cookies when logout.
We can try with another library manage cookies.
@jinguohao1991 here is code for you:

        <InstagramLogin
          ref={ref => this.instagramRef = ref}
          clientId='************'
          redirectUrl='************'
          scopes={['basic']}
          onLoginSuccess={(token) => this.setState({ token })}
          onLoginFailure={(data) => this.setState({ failure: data })}
          cacheEnabled={false}
          incognito={true}
          thirdPartyCookiesEnabled={false}
          sharedCookiesEnabled={false}
          domStorageEnabled={false}
        />

from react-native-instagram-login.

IcebergRage avatar IcebergRage commented on May 31, 2024 1

I found :
Add this in Webview

cacheEnabled={false}
incognito={true}
thirdPartyCookiesEnabled={false}
sharedCookiesEnabled={false}
domStorageEnabled={false}

I will do a PR soon

from react-native-instagram-login.

hungdev avatar hungdev commented on May 31, 2024

@jinguohao1991 To login with another account, you must clear cookies before login another account.
Please read:
https://github.com/hungdev/react-native-instagram-login#logout

from react-native-instagram-login.

hungdev avatar hungdev commented on May 31, 2024

@jinguohao1991 Feel free to let me know if you cant resolve your problem.

from react-native-instagram-login.

turtlebe avatar turtlebe commented on May 31, 2024

Thank you for your reply.
I have still the same issue.
I have installed "react-native-cookies": "^3.3.0", and linked to iOS manually.
This is my code for opening Instagram Login modal

const onInstaLoginClick = () => {
CookieManager.clearAll().then(() => {
this.setState({ token: null })
});
this.instagramLogin.show();
};

The instagram still logs in with previous Account automatically.
So I cannot use another account.

from react-native-instagram-login.

turtlebe avatar turtlebe commented on May 31, 2024

I have tried your example with your video.
Here is my recorded video.
https://www.youtube.com/watch?v=6W-RVOUFLqE&feature=youtu.be
Thank you.

from react-native-instagram-login.

IcebergRage avatar IcebergRage commented on May 31, 2024

Hello, I have the same issue.
Do you have any solution ?

from react-native-instagram-login.

turtlebe avatar turtlebe commented on May 31, 2024

Hi, @IcebergRage. Thank you.
If I test with https://github.com/hungdev/react-native-instagram-login/tree/master/Example, where to put this code?
Inside this package directly or inside my code?
Hope your update.

from react-native-instagram-login.

turtlebe avatar turtlebe commented on May 31, 2024

@jinguohao1991 @IcebergRage I know the reason. Due to the cookies library is not working and I'm trying to find a way to help you.
read more:
joeferraro/react-native-cookies#78
joeferraro/react-native-cookies#127
currently, temporary solution is disable cookies, but in some cases when logging back, we need to keep cookies, and users don't need to log in again.
So i still recommend persist cookies and clear cookies when logout.
We can try with another library manage cookies.
@jinguohao1991 here is code for you:

        <InstagramLogin
          ref={ref => this.instagramRef = ref}
          clientId='************'
          redirectUrl='************'
          scopes={['basic']}
          onLoginSuccess={(token) => this.setState({ token })}
          onLoginFailure={(data) => this.setState({ failure: data })}
          cacheEnabled={false}
          incognito={true}
          thirdPartyCookiesEnabled={false}
          sharedCookiesEnabled={false}
          domStorageEnabled={false}
        />

This works perfectly for me.
<InstagramLogin
ref={ref => this.instagramRef = ref}
clientId=''
redirectUrl='
'
scopes={['basic']}
onLoginSuccess={(token) => this.setState({ token })}
onLoginFailure={(data) => this.setState({ failure: data })}
cacheEnabled={false}
useWebKit={true}
sharedCookiesEnabled={true}
/>

from react-native-instagram-login.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.