Skip to content

Lazy load recaptcha files #8688

Closed
Closed
@LanderBeeuwsaert

Description

@LanderBeeuwsaert

Operating System

(any) windows 11

Environment (if applicable)

(any) chrome

Firebase SDK Version

10.12.5

Firebase SDK Product(s)

AppCheck

Project Tooling

doesn't really matter for the issue

Detailed Problem Description

We use appCheck + recaptcha in our web application.
When looking at the network tab, we see that the recaptcha is quite big and would like to optimize where/if possible.
Image

there are 2 points that are standing out:

  1. why is the recaptcha library always loaded? Even if the user is already logged in? Shouldn't recaptcha only load when appCheck wants to verifying that a user is a valid user? So during a login attempt? Is it somehow possible to lazy load the recaptcha library?

  2. there are 2 instances/js files of 221kb that are being loaded? Seems the same file is loaded twice. Is this because of a misconfiguration from our side or is there a valid reason for this?

Steps and code to reproduce issue

we load the library like this in our angular web application:
Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions