SupremeTechnopriest / react-idle-timer

User activity timer component
https://idletimer.dev
MIT License
1.13k stars 142 forks source link

oAuth Page issue #269

Closed sumitaney closed 2 years ago

sumitaney commented 2 years ago

I’m facing the when redirect to payments oauth page and our application gets logout if we are on third party page react-idle-timer gets logout in the back

SupremeTechnopriest commented 2 years ago

Hey @sumitaney. Could you elaborate on this a bit? I don't quite follow.

sumitaney commented 2 years ago

Hey @SupremeTechnopriest In our application we have third party payment integration, So if we redirect to that page our react idle timer starts in the background because it doesn’t detect the activity and User gets logged out. It should not happen if we are in the application until we get the success message from payment and return to our homepage.

SupremeTechnopriest commented 2 years ago

I see. You can use the startManually prop to prevent the timer from starting until you want it to. Just call start when you want to kick things off. You think that would work for you?

https://idletimer.dev/docs/api/props#startmanually https://idletimer.dev/docs/api/methods#start

sumitaney commented 2 years ago

Thanks let me check with this, I hope it will work!

SupremeTechnopriest commented 2 years ago

No dice? If you want to share some code or make a code sandbox I can help you sort it out.

sumitaney commented 2 years ago

Thanks for your resolution we are still figuring out with this solution, As of now I can close it. If we can’t make it I will reopen.