Skip to content

Commit d965c2b

Browse files
Hook up log_exceptions, default false (#44)
1 parent f9c8a4c commit d965c2b

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

propelauth_flask/__init__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from flask import g
44
from propelauth_py import (
55
TokenVerificationMetadata,
6+
configure_logging,
67
init_base_auth,
78
init_base_async_auth,
89
SamlIdpMetadata,
@@ -870,7 +871,10 @@ def init_auth(
870871
api_key: str,
871872
token_verification_metadata: Optional[TokenVerificationMetadata] = None,
872873
debug_mode=False,
874+
log_exceptions=False,
873875
) -> FlaskAuth:
876+
configure_logging(log_exceptions=log_exceptions)
877+
874878
"""Fetches metadata required to validate access tokens and returns auth decorators and utilities"""
875879
return FlaskAuth(
876880
auth_url=auth_url,
@@ -885,6 +889,9 @@ def init_auth_async(
885889
token_verification_metadata: Optional[TokenVerificationMetadata] = None,
886890
debug_mode=False,
887891
httpx_client: Optional[httpx.AsyncClient] = None,
892+
log_exceptions=False,
888893
) -> FlaskAuthAsync:
894+
configure_logging(log_exceptions=log_exceptions)
895+
889896
"""Fetches metadata required to validate access tokens and returns auth decorators and utilities"""
890-
return FlaskAuthAsync(auth_url=auth_url, integration_api_key=api_key, token_verification_metadata=token_verification_metadata, debug_mode=debug_mode, httpx_client=httpx_client)
897+
return FlaskAuthAsync(auth_url=auth_url, integration_api_key=api_key, token_verification_metadata=token_verification_metadata, debug_mode=debug_mode, httpx_client=httpx_client)

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
flask<4
2-
propelauth-py==4.2.7
2+
propelauth-py==4.2.8
33
pytest
44
requests-mock
5-
httpx
5+
httpx

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
setup(
1414
name="propelauth-flask",
15-
version="4.2.7",
15+
version="4.2.8",
1616
description="A library for managing authentication in Flask",
1717
long_description=README,
1818
long_description_content_type="text/markdown",
@@ -21,7 +21,7 @@
2121
author="PropelAuth",
2222
author_email="support@propelauth.com",
2323
license="MIT",
24-
install_requires=["flask<4", "propelauth-py==4.2.7", "requests", "httpx>=0.28.1"],
24+
install_requires=["flask<4", "propelauth-py==4.2.8", "requests", "httpx>=0.28.1"],
2525
setup_requires=pytest_runner,
2626
tests_require=["pytest==4.4.1"],
2727
test_suite="tests",

0 commit comments

Comments
 (0)