How to keep OAuth connected

Hi everyone, i’m using Google OAuth for my api calls, the problem is that after more or less 1 hour it automatically disconnects, which is a big problem for my usecase because my entire app stops working in the background.
Is there a workaround for this? Maybe an option in the security settings? Or at least can i get notified when this happens? (i would much prefare to remain connected, at least until longer periods of inactivity)

Can you share your API Connector Settings? Also, do your user signup using their email and after connect to Google or they signup using Google directly?

The users signup directly using Google

I don’t know what the red message is about, it appears also when i am connected and everythings works fine

Actually it is probably more then 1 hour, maybe around 2-3 but the result is the same, and actually it is not 2-3 hours of inactivity it is just 2-3 hours from the last connection

You should enable access_type offiline.
Bubble will not refresh your token for the API Connector, but it should work for your user. You will see the red message every time your token expire in API Connector. But it doesn’t change anything for the user.

2 Likes

It still disconnected… I have to say that i’m still on the developer version, but i don’t know if turning into the live version this will be different. What else could i try?

And do the user only login/signup using this oauth?

Well i could add the classic Bubble login/signup but the user will still need to connect his google account with the oauth

No. It should keep login if they use Google as signup . Did you try without debug mode to create a new user and check if they stay logged in?

The best way to build out a manual OAuth2 flow.

Sometimes the native OAuth2 doesn’t refresh access tokens.

This topic was automatically closed after 70 days. New replies are no longer allowed.