App Module
Read an app’s own public configuration — currently just its visibility.base44.app— Available in any authentication mode (anonymous, user, or service role). The client sends its token, if it has one, with the request.
Contents
Methods
getPublicSettings()
Retrieves the app’s public settings. Use it to determine whether the current visitor can access the app, and to decide whether to redirect them to the login page.
Returns: Promise<AppPublicSettingsResponse> — { id, public_settings }, where public_settings is the app’s visibility (see Type Definitions).
Throws: rejects with a Base44Error with status: 403 when the visitor can’t access the app. Check error.data.extra_data.reason:
auth_required— the visitor must sign in.user_not_registered— the visitor is signed in but doesn’t have access.
Notes
- Frontend and backend:
appworks in any authentication mode — anonymous, user, or service role (base44.appis the same in all of them; there’s no separateasServiceRole.app). - If the app requires login, use
redirectToLogin()from the auth module to send the visitor to the login page.