Forum Academy Marketplace Showcase Pricing Features

[New plugin] 🔒 Auth0 integration

Hey Keith,

I did some testing using the plugin this morning and was able to get a LinkedIn token which I used in an api call to get the profile, so that’s a start. Next up is to explore where the token refresh is handled.

1 Like

Hi Keith,
The plugin does not provide yet refresh tokens for Auth0, so it’s impossible for now to get access to the provider API (like google API) when offline.
It’s a great idea though !
I will look into it but it’s likely to take some time because of choices I made to give a faster UX to the login process (I used a simpler auth flow rather than the classical login flow). I will at the same time look into @NigelG great suggestion to see how it may fit in the plugin and help regarding this matter. Thanks a lot Nigel for the printscreens !! I had no idea that the Authentification dropdown was helpful here :thinking:

If someone from the Bubble team is reading here: documentation for plugin builders could benefit of some improvements…

I followed the plugin setup steps, but perhaps I’m missing an important part. The plugin or perhaps Bubble itself is throwing the following errors in the console.

Error - Element index - Please include an email
x5:formatted:18056 Workflow failed: Please include an email
x5:formatted:4349 Error - Action Auth0 - server verification - Please include an email
x5:formatted:4349 Error - Element index - Please include an email

Hi michael, i just answered your email, let’s sort this out and we will post here the details about resolution of your issue :slight_smile:

Hello @NigelG I’ve tried API Connector - Auth0 as you did bump its I cannot request token properly e.g screenshot.
Any idea? thx

I had wrong app secret setup :sweat_smile:its now working with the following settings


Nice :slight_smile:

Tips : Instead of User ID key path you can use email instead of sub
If an user auth0 with google or email (same email) it will return existing user instead of creating a new one


I’m running into an issue with this plugin because I cannot pass a logout URL to Auth0.
This is way Auth0 always redirects back to the same page when Logging in and after Logout.
Did anyone manage to detect in Bubble when the users actually logged out?

Hi Louis,
There is at the moment no parameter for a logout redirect Url and it seems to be missing. I will add this functionality to the plugin by the end of the week.
Can you confirm that you are using the SingleLogout action ?

Can a Bubble app be turned into a OAuth Server (not client like normally) and issue access tokens to other systems using Auth0?

Hey there! This plugin is really awesome. Just one thing. Whenever I start a workflow for Auth0 login, the following popup appears. Is there a way in which this image doesn’t appear? Thanks!

1 Like

This behavior is quite new, it wasn’t behaving like this a few months ago. I guess a Bubble update created it… I will look more into it to see if we can prevent this window to display.

Hi @pipeabellos ,
First I want to apologize for such a long time to respond to your inquiry… I have been in discussion with Bubble support team in May and they were very reactive but I took me a while before finding some time to get back to it and properly test what they suggested.
I just published version 4.7.0 of the plugin that prevents this annoying message to display when logging in and logging out.
It may disable in certain circumstances (I guess it could happen after a successful login but I’m unsure) similar messages that could display when trying to leave the site.

Let me know if there are any issues with this update

1 Like

hey @vparpoil, I established a Facebook connection but I got the error

Notice that the native Facebook/Bubble log in/redirect works just fine…also the Google Auth0 works well, have you seen this issue before? thanks

@vparpoil I was able to fix it, basically I put the callback url into my FB/Google apps instead of the bubble callback.

is there a way to specify a dynamic RETURN URL for Auth0? I want to return to the LAST PAGE I was before I was redirected to the LOGIN page…
similar to what Stripe does with checkout then return url to the last page before leaving your website.

1 Like

Hi @natserrano,
I’m glad you figured it out !
Actually this is not possible : the return URL cannot be dynamic because the return URL needs to have a special behavior to handle user data and process it to log the user in.
To achieve this behavior, you need to store in database some kind of user-identifier (like a session ID stored in a cookie) and store the last page visited along. Then you add a navigation action right after login to redirect the user to the last page he was visiting by matching the cookie-like session ID to what you have in database. I would also add a lifetime to the entries in database so that they don’t last forever.
I hope that makes sense

it makes sense, but if the current user is not logged in…how can I save a “last_page_visited” to the current user?

user is not logged in, in page X (How to save last_page_visited=pageX, if current user is not logged in)
redirected to auth0
back to returnURL, redirected to page X

Or is there a way to specify a parameter in the callback url?

This is why you need a unique identifier for anonymous users, what I called session in my previous post. In bubble, I looked up and I think you can use the bubble cookies, but I’m unsure how to use them.
Another way is to generate a string and store it in local storage / cookie on first load of a page, then whenever the user navigates, you check if the string is present or not.
Then, you create a new datatype with two fields : session and lastUrl
at every page load you do an upsert* with session and the current url
After login, you check in this data the line where the session is the one of the user and you get the url he was accessing right before being redirected.

I still cannot make it work. the Upserting* has been deprecated.

I tried to use the bubble cookie, saved the destination_page to the anonymous user, but coming back from auth0 the newly created record doesn’t have the destination_page field/value anymore.

there must be a better way…