I have set up a Zap for bubble app inside of Zapier.
Basically - I can send an invite link to my customers, they can click on it and add our app’s Zap into their Zapier account
Then it prompts them to log into their (our Bubble app) account via the login page.
This all works great
However - after 24 hours, the connections expires and they need to log back into Zapier, and reconnect by logging back in.
Anybody run into this problem before? I’ve been stuck on it for a few weeks.
I think it’s the refresh token not working properly, but it is tough to diagnose because I have to wait 24 hours to see if a fix worked or not.
Perhaps the flow to log the user in does not have a yes here:
If you do not set this setting Bubble will log a user out after 24 hours
Looks like I do have it marked as “yes” for stay logged in.
I have Remember the email marked as “yes” as well
Thank you for suggesting to check this out - I appreciate it.
You can debug it by using Postman and making a api request to your login endpoint and see the expire time (ms) for the token which is returned.
Hey Shawn - would that work for the expiry issue? Or only for initial authentication? The initial auth works great - but then it isn’t getting credentials correctly upon re-auth at the 24 hour mark
Happy to pay $250 USD to anybody who can help me solve this for good.
Just sent you a DM, can you please share your login api endpoint
Does Bubble even provide Refresh Tokens ?
(assuming I have this the right way round, that Zapier is using Bubble as OATH provider).
I don’t think so. Maybe that’s where I am not understanding things.
The URL I am calling for the refresh token is the same as the initial auth token endpoint.
Bubble support mentioned others were doing it this way.
One thing I am unsure is… I have it set to grant type = refresh_token
But in the initial call it is set to “authorize”
I wonder if the Refresh call should also be set to authorize, because it’s not technically a refresh endpoint.
I’ll put this on my list of things to test.
Wish I could figure out how to test this faster - rather than wait 24 hours to see if it works or not.
Thanks for the response Nigel
Standardish oauth2 the refresh token is passed to the accessToken endpoint.
This is the same endpoint that you use the swap the code from authorise for a token (+ a refresh token).
Usually grant_type = refresh_token is passed and refresh_token as well (including client id and secret as it is server side).
So… First Pass.
grant_type = authorization_code
(and probably the redirect_uri as well)
grant_type = refresh_token
(very excited about having a bubble based oauth zap. Good work!)
I’ll give this a try. Thank you Nigel
Sorry I had not shared the refresh token setup in my other thread (I’ve added it now, see this message). What Nigel is saying above makes total sense.