Repository navigation
Conversation
`login({ footer })` forwards a structured footer to the native SDKs, which
render it below the login box's card on its login screen only: the
embedded-mode equivalent of `boxFooter` in @frontegg/react.
Like `themeOptions` and `localizations`, an omitted footer is sent as null
and clears, so each call fully determines the box's appearance.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #135 (JS side).
Review the native PRs first. They carry the mechanism, and this one only forwards to them:
This PR does not build until those land, because the bridges assign
loginBoxFooter, which they add. As with #128, a native CI failure onloginBoxFooteris expected until then.What
login()accepts afooteralongsidethemeOptionsandlocalizations:It is rendered below the login box's card, on its login screen only. This is the embedded-mode equivalent of
boxFooterin@frontegg/react. The rationale is in #135.Changes
src/FronteggNative.ts:LoginBoxCustomization.footer, withLoginBoxFooter,LoginBoxFooterRowandLoginBoxFooterSegmenttypes. The footer is sent throughloginWithOptionswith the same per-call semantics as the other two: omitted meansnull, which clears it. A footer also counts toward the "customization needs a newer native SDK" warning on old binaries.FronteggApp.shared.loginBoxFooter = customization?["footer"]storage.loginBoxFooter = customization?.getMap("footer")?.toHashMap()docs/api.md: afooterrow in the options table, plus a "Login box footer" section covering link handling andhideCaptchaBadge.No new bridge method:
loginWithOptionsalready takes the customization map, so a JS-only update against an older binary still signs in, and only the footer is dropped.Tests
src/__tests__/index.test.tsxhas 15 tests, all passing. There is a new case for forwarding a footer, and the existing expectations now includefooter: null. A deliberate mutation that stops forwarding the footer is caught.tscandeslintare clean onsrc.🤖 Generated with Claude Code
Note
Medium Risk
Touches the login customization path and deep-link handling for footer URLs; behavior relies on companion native SDK changes until those ship.
Overview
Adds
footertologin()options so embedded login can show structured content below the login card (parity with@frontegg/react’sboxFooter).TypeScript defines
LoginBoxFooter(rows of text/link segments, optionalhideCaptchaBadge) and passesfooterthrough existingloginWithOptionswith the same per-call rules as theme/localizations: omitted fields becomenulland clear prior overrides. A non-null footer also triggers the “needs newer native SDK” fallback warning on old binaries.iOS and Android bridges persist the payload via
loginBoxFooterinapplyLoginBoxCustomization. Docs document the option, link URL rules, and reCAPTCHA attribution. Tests assert footer forwarding and updated null-clearing expectations.Depends on upstream native SDKs that implement
loginBoxFooterrendering.Reviewed by Cursor Bugbot for commit bc092d0. Bugbot is set up for automated code reviews on this repo. Configure here.