lazy import firebase

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer 2023-09-08 19:24:20 +02:00
parent 25e7fc58b3
commit 9edccb1a9d
No known key found for this signature in database
1 changed files with 2 additions and 3 deletions

View File

@ -32,9 +32,6 @@ from authentik.lib.models import SerializerModel
from authentik.stages.authenticator.models import Device
from authentik.tenants.utils import DEFAULT_TENANT
cred = credentials.Certificate("firebase.json")
initialize_app(cred)
LOGGER = get_logger()
@ -128,6 +125,8 @@ class MobileTransaction(ExpiringModel):
def send_message(self, request: Optional[HttpRequest], **context):
"""Send mobile message"""
cred = credentials.Certificate("firebase.json")
initialize_app(cred)
branding = DEFAULT_TENANT.branding_title
domain = ""
if request: