Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refreshToken not working #25

Open
GSFZamai opened this issue Jul 21, 2022 · 6 comments
Open

refreshToken not working #25

GSFZamai opened this issue Jul 21, 2022 · 6 comments

Comments

@GSFZamai
Copy link

Hi there!
I noticed that the call of the refreshToken on the reference stopped working on my app.
For now as work around I'm using React state to render and hide the Recaptcha component.
Anyone else having the same issue?

@Sewb21
Copy link

Sewb21 commented Sep 8, 2022

Same here

@GSFZamai
Copy link
Author

GSFZamai commented Sep 8, 2022

Hi there, i did some tests here. And seems to be related to the react-native-webview.
In my case, when the react-native-webview is updated to 11.20, some way it conflicts with the recaptcha's webview dependence and refreshToken stops working. When I downgrade to 11.18, it works perfectly.

@Sewb21
Copy link

Sewb21 commented Sep 8, 2022

Hey, so I thought this might be the case so I downgraded react-native-webview but I am using Expo on the latest SDK 46 and I encountered some build issues. I've reverted back to Expo 45 anyway for the time being due to other reasons

@GSFZamai
Copy link
Author

GSFZamai commented Sep 8, 2022

But I did one workaround (before I downgrade webview).
Created one state to show/hide my Recaptcha component, and when I need to refresh token, I set to true, after processing the token, on the end of onReceiveToken method just set to false.
Every time you set true, it'll re-render and generete a new token, proccess and destroy your component.

@Sewb21
Copy link

Sewb21 commented Sep 8, 2022

Yeah, I managed to get something like this working so I guess will have to be the solution until/if the package gets fixed. Thank you @GSFZamai 😄

@amitkumar144
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants