Replit Auth 2.0 Failing in Iframe

Hey all. I’m trying to use the prebuilt replit login page, but I’m experiencing some bugs.

The auth works fine when opening the site in a new tab or directly going to the site, but fails when running the site on the project page thru the iframe. Here’s the steps I used to better explain it:

  1. Running the replit thru the project page, shows the login page:

  2. Clicked auth, opens another auth page, clicked authorize, successfully authorizes and it closes the page going back to the project page with the iframe.

  3. The iframe reloads, but does not actually authenticate and reshows the same login page from step 1; no matter how many times you press the auth button and authenticate.

I think this might be a bug in the Replit Auth System in some browsers; from my testing, it does not work in newest Safari, some versions of Firefox, and some versions of Chromium. It does, however, work on some versions of Chrome.

I’m kinda confused why this is happening and would greatly appreciate it if someone could explain what’s wrong and maybe ways to solve/circumvent this issue! Thanks!

1 Like

Do you have third-party cookies (cross-site tracking) enabled? If any of these are blocked, you will experience this behavior.

2 Likes

Ahh I see, yeah that’s probably it- I suspected that before but I thought I had them enabled on Safari; I guess I didn’t… are there any fixes or should I use a different Replit Auth system?

2 Likes

If I understand correctly there is only one Repl Auth system.

2 Likes

Oh maybe there was; I was just checking the docs and there seems to be different ways to authenticate using Replit, and there were two sections (1.0/2.0):


Maybe there’s one underlying system but from the docs, I think Replit has different methods of integration

1 Like

It’s the same system. 2.0 is just an update for when new features were added.

1 Like

Ok… but back to the main question, are there any fixes/solutions? Is the only thing I can do is not use the prebuilt login page and include it manually in my HTML template?

I think this may be a bug, I changed the category.