hungdev / react-native-instagram-login

a react native instagram login component (support android & ios). Pull requests are welcome!
https://www.npmjs.com/package/react-native-instagram-login
184 stars 103 forks source link

after logging in it redirect the user to the redirect url in android that is set to google (ios is working fine) #83

Open sajjad-yousaf opened 3 years ago

sajjad-yousaf commented 3 years ago

<InstagramLogin ref={ref => (this.instagramLogin = ref)} appId='***' appSecret='****' redirectUrl='https://google.com/' scopes={['user_profile', 'user_media']} onLoginSuccess={this.setIgToken} onLoginFailure={(data) => console.log(data)} />

this is my code that i used for instagram login, but i am facing an issue that after entering credentials, user is redirected to chrome instead of coming back to app with response, can anyone please help me how can i solve this problem?

hungdev commented 3 years ago

can you give me the video about this?

Lg0gs commented 3 years ago

@TeamDlxx @hungdev I figured out how to solve this issue. instagram.js file, line: 51 if (url && url.startsWith(this.props.redirectUrl)) { this is always false because the URL starts with https://www.google.com and my redirectUrl is https://google.com. You need to add www everywhere