Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: oauth provider #549

Merged
merged 52 commits into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
e2f316f
fix: files for oauth2 providers
sattvikc Nov 11, 2024
59109a8
fix: interface
sattvikc Nov 12, 2024
f577523
fix: oauth2 interfaces
sattvikc Nov 12, 2024
6479bda
fix: update recipe.py
sattvikc Nov 26, 2024
94fc82d
fix: login request impl
sattvikc Nov 26, 2024
1fe7e51
fix: query params for put request
sattvikc Nov 26, 2024
8f96467
fix: consent request
sattvikc Nov 26, 2024
804121d
fix: more impl
sattvikc Nov 26, 2024
22ab47b
fix: more impl
sattvikc Nov 27, 2024
e7fe99c
Merge branch '0.26' into feat/oauth-provider
sattvikc Nov 29, 2024
e776828
fix: recipe impl
sattvikc Nov 29, 2024
f462284
fix: recipe impl
sattvikc Nov 29, 2024
c83ef6f
fix: validate_oauth2_access_token
sattvikc Nov 29, 2024
2f7e994
fix: authorization
sattvikc Nov 29, 2024
00a6128
fix: token exchange
sattvikc Nov 29, 2024
6f6b6e4
fix: frontend redirection url
sattvikc Nov 29, 2024
07868f1
fix: revoke token
sattvikc Nov 29, 2024
4386cb8
fix: end session
sattvikc Nov 29, 2024
2c06ffb
fix: api stubs
sattvikc Dec 2, 2024
eae13cc
fix: api structures and lint fixes
sattvikc Dec 2, 2024
c4c8d11
fix: remaining type fixes
sattvikc Dec 2, 2024
a1dff9d
fix: end session
sattvikc Dec 3, 2024
1e35b54
fix: api endpoints
sattvikc Dec 3, 2024
79194a4
fix: remaining apis
sattvikc Dec 4, 2024
fbee6d6
fix: remaining impl
sattvikc Dec 4, 2024
9eb33ce
fix: typing
sattvikc Dec 4, 2024
e3d1287
fix: type and lint
sattvikc Dec 10, 2024
3041401
fix: types, exposed functions and cyclic import
sattvikc Dec 11, 2024
34e96da
fix: backend sdk tests
sattvikc Dec 12, 2024
d8dd684
fix: default recipes and fixes for test
sattvikc Dec 12, 2024
fc42477
fix: tests
sattvikc Dec 12, 2024
724c97b
fix: tests
sattvikc Dec 12, 2024
dae1204
fix: tests
sattvikc Dec 12, 2024
213b9fe
fix: tests
sattvikc Dec 12, 2024
92a7a0b
fix: tests
sattvikc Dec 13, 2024
91926ae
fix: tests
sattvikc Dec 13, 2024
632b5dd
fix: openid and cookies
sattvikc Dec 17, 2024
2685c31
fix: roles and permissions for oauth2
sattvikc Dec 17, 2024
0226085
fix: auth react tests
sattvikc Dec 17, 2024
fac7217
fix: tests and changes for oauth2 provider (#551)
sattvikc Dec 30, 2024
15bba3a
fix: changelog
sattvikc Dec 30, 2024
8664900
fix: check lint output in pre-commit
sattvikc Dec 30, 2024
ae59ae4
fix: cyclic import
sattvikc Dec 30, 2024
75b1d77
fix: cyclic import
sattvikc Dec 30, 2024
873ce29
fix: cyclic import
sattvikc Dec 30, 2024
f575893
fix: cyclic import
sattvikc Dec 30, 2024
01e0966
fix: cyclic import
sattvikc Dec 30, 2024
7e052ca
fix: cyclic import
sattvikc Dec 30, 2024
c605691
fix: cyclic import
sattvikc Dec 30, 2024
f2b94ab
fix: cyclic import
sattvikc Dec 30, 2024
571dae6
fix: cyclic import
sattvikc Dec 30, 2024
8eb6114
fix: cyclic import
sattvikc Dec 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .circleci/config_continue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
test-backend-sdk-testing:
docker:
- image: python:<< parameters.python-version >>
- image: rishabhpoddar/oauth-server-cicd
resource_class: large
parameters:
cdi-version:
Expand All @@ -54,6 +55,7 @@ jobs:
test-website-fastapi:
docker:
- image: python:<< parameters.python-version >>
- image: rishabhpoddar/oauth-server-cicd
resource_class: large
parameters:
fdi-version:
Expand All @@ -74,6 +76,7 @@ jobs:
test-website-flask:
docker:
- image: python:<< parameters.python-version >>
- image: rishabhpoddar/oauth-server-cicd
resource_class: large
parameters:
fdi-version:
Expand All @@ -94,6 +97,7 @@ jobs:
test-website-django:
docker:
- image: python:<< parameters.python-version >>
- image: rishabhpoddar/oauth-server-cicd
resource_class: large
parameters:
fdi-version:
Expand All @@ -114,6 +118,7 @@ jobs:
test-website-drf-async:
docker:
- image: python:<< parameters.python-version >>
- image: rishabhpoddar/oauth-server-cicd
resource_class: large
parameters:
fdi-version:
Expand All @@ -134,6 +139,7 @@ jobs:
test-website-drf-sync:
docker:
- image: python:<< parameters.python-version >>
- image: rishabhpoddar/oauth-server-cicd
resource_class: large
parameters:
fdi-version:
Expand All @@ -154,6 +160,7 @@ jobs:
test-website-django2x:
docker:
- image: python:<< parameters.python-version >>
- image: rishabhpoddar/oauth-server-cicd
resource_class: large
parameters:
fdi-version:
Expand All @@ -174,6 +181,7 @@ jobs:
test-website-flask-nest-asyncio:
docker:
- image: python:<< parameters.python-version >>
- image: rishabhpoddar/oauth-server-cicd
resource_class: large
environment:
SUPERTOKENS_NEST_ASYNCIO: "1"
Expand All @@ -197,6 +205,7 @@ jobs:
test-authreact-fastapi:
docker:
- image: python:<< parameters.python-version >>
- image: rishabhpoddar/oauth-server-cicd
environment:
MOCHA_FILE: /root/test_report/report_node-<< parameters.fdi-version >>.xml
parameters:
Expand Down Expand Up @@ -227,6 +236,7 @@ jobs:
test-authreact-flask:
docker:
- image: python:<< parameters.python-version >>
- image: rishabhpoddar/oauth-server-cicd
resource_class: large
environment:
MOCHA_FILE: /root/test_report/report_node-<< parameters.fdi-version >>.xml
Expand Down Expand Up @@ -258,6 +268,7 @@ jobs:
test-authreact-django:
docker:
- image: python:<< parameters.python-version >>
- image: rishabhpoddar/oauth-server-cicd
resource_class: large
environment:
MOCHA_FILE: /root/test_report/report_node-<< parameters.fdi-version >>.xml
Expand Down
3 changes: 2 additions & 1 deletion .circleci/markDevTagAsTestNotPassed.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ while IFS='"' read -ra ADDR; do
done
done <<< "$version"

responseStatus=`curl -s -o /dev/null -w "%{http_code}" -X PUT \
responseStatus=`curl -s -o out.bin -w "%{http_code}" -X PUT \
https://api.supertokens.io/0/driver \
-H 'Content-Type: application/json' \
-H 'api-version: 0' \
Expand All @@ -35,5 +35,6 @@ responseStatus=`curl -s -o /dev/null -w "%{http_code}" -X PUT \
if [ $responseStatus -ne "200" ]
then
echo "failed core PUT API status code: $responseStatus. Exiting!"
cat out.bin
exit 1
fi
7 changes: 7 additions & 0 deletions .circleci/setupAndTestBackendSDKWithFreeCore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ echo -e "core,$1\nplugin-interface,$pluginInterfaceVersionXY" > modules.txt
./loadModules --ssh
cd supertokens-core
git checkout $coreTag

# Update oauth provider config in devConfig.yaml
sed -i 's/# oauth_provider_public_service_url:/oauth_provider_public_service_url: "http:\/\/localhost:4444"/' devConfig.yaml
sed -i 's/# oauth_provider_admin_service_url:/oauth_provider_admin_service_url: "http:\/\/localhost:4445"/' devConfig.yaml
sed -i 's/# oauth_provider_consent_login_base_url:/oauth_provider_consent_login_base_url: "http:\/\/localhost:3001\/auth"/' devConfig.yaml
sed -i 's/# oauth_client_secret_encryption_key:/oauth_client_secret_encryption_key: "asdfasdfasdfasdfasdf"/' devConfig.yaml

cd ../supertokens-plugin-interface
git checkout $pluginInterfaceTag
cd ../
Expand Down
7 changes: 7 additions & 0 deletions .circleci/setupAndTestWithAuthReact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ echo -e "core,$1\nplugin-interface,$pluginInterfaceVersionXY" > modules.txt
./loadModules --ssh
cd supertokens-core
git checkout $coreTag

# Update oauth provider config in devConfig.yaml
sed -i 's/# oauth_provider_public_service_url:/oauth_provider_public_service_url: "http:\/\/localhost:4444"/' devConfig.yaml
sed -i 's/# oauth_provider_admin_service_url:/oauth_provider_admin_service_url: "http:\/\/localhost:4445"/' devConfig.yaml
sed -i 's/# oauth_provider_consent_login_base_url:/oauth_provider_consent_login_base_url: "http:\/\/localhost:3001\/auth"/' devConfig.yaml
sed -i 's/# oauth_client_secret_encryption_key:/oauth_client_secret_encryption_key: "asdfasdfasdfasdfasdf"/' devConfig.yaml

cd ../supertokens-plugin-interface
git checkout $pluginInterfaceTag
cd ../
Expand Down
7 changes: 7 additions & 0 deletions .circleci/setupAndTestWithAuthReactWithDjango.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ echo -e "core,$1\nplugin-interface,$pluginInterfaceVersionXY" > modules.txt
./loadModules --ssh
cd supertokens-core
git checkout $coreTag

# Update oauth provider config in devConfig.yaml
sed -i 's/# oauth_provider_public_service_url:/oauth_provider_public_service_url: "http:\/\/localhost:4444"/' devConfig.yaml
sed -i 's/# oauth_provider_admin_service_url:/oauth_provider_admin_service_url: "http:\/\/localhost:4445"/' devConfig.yaml
sed -i 's/# oauth_provider_consent_login_base_url:/oauth_provider_consent_login_base_url: "http:\/\/localhost:3001\/auth"/' devConfig.yaml
sed -i 's/# oauth_client_secret_encryption_key:/oauth_client_secret_encryption_key: "asdfasdfasdfasdfasdf"/' devConfig.yaml

cd ../supertokens-plugin-interface
git checkout $pluginInterfaceTag
cd ../
Expand Down
7 changes: 7 additions & 0 deletions .circleci/setupAndTestWithAuthReactWithFlask.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ echo -e "core,$1\nplugin-interface,$pluginInterfaceVersionXY" > modules.txt
./loadModules --ssh
cd supertokens-core
git checkout $coreTag

# Update oauth provider config in devConfig.yaml
sed -i 's/# oauth_provider_public_service_url:/oauth_provider_public_service_url: "http:\/\/localhost:4444"/' devConfig.yaml
sed -i 's/# oauth_provider_admin_service_url:/oauth_provider_admin_service_url: "http:\/\/localhost:4445"/' devConfig.yaml
sed -i 's/# oauth_provider_consent_login_base_url:/oauth_provider_consent_login_base_url: "http:\/\/localhost:3001\/auth"/' devConfig.yaml
sed -i 's/# oauth_client_secret_encryption_key:/oauth_client_secret_encryption_key: "asdfasdfasdfasdfasdf"/' devConfig.yaml

cd ../supertokens-plugin-interface
git checkout $pluginInterfaceTag
cd ../
Expand Down
7 changes: 7 additions & 0 deletions .circleci/setupAndTestWithFreeCore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ echo -e "core,$1\nplugin-interface,$pluginInterfaceVersionXY" > modules.txt
./loadModules --ssh
cd supertokens-core
git checkout $coreTag

# Update oauth provider config in devConfig.yaml
sed -i 's/# oauth_provider_public_service_url:/oauth_provider_public_service_url: "http:\/\/localhost:4444"/' devConfig.yaml
sed -i 's/# oauth_provider_admin_service_url:/oauth_provider_admin_service_url: "http:\/\/localhost:4445"/' devConfig.yaml
sed -i 's/# oauth_provider_consent_login_base_url:/oauth_provider_consent_login_base_url: "http:\/\/localhost:3001\/auth"/' devConfig.yaml
sed -i 's/# oauth_client_secret_encryption_key:/oauth_client_secret_encryption_key: "asdfasdfasdfasdfasdf"/' devConfig.yaml

cd ../supertokens-plugin-interface
git checkout $pluginInterfaceTag
cd ../
Expand Down
7 changes: 7 additions & 0 deletions .circleci/setupAndTestWithFrontend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ echo -e "core,$1\nplugin-interface,$pluginInterfaceVersionXY" > modules.txt
./loadModules --ssh
cd supertokens-core
git checkout $coreTag

# Update oauth provider config in devConfig.yaml
sed -i 's/# oauth_provider_public_service_url:/oauth_provider_public_service_url: "http:\/\/localhost:4444"/' devConfig.yaml
sed -i 's/# oauth_provider_admin_service_url:/oauth_provider_admin_service_url: "http:\/\/localhost:4445"/' devConfig.yaml
sed -i 's/# oauth_provider_consent_login_base_url:/oauth_provider_consent_login_base_url: "http:\/\/localhost:3001\/auth"/' devConfig.yaml
sed -i 's/# oauth_client_secret_encryption_key:/oauth_client_secret_encryption_key: "asdfasdfasdfasdfasdf"/' devConfig.yaml

cd ../supertokens-plugin-interface
git checkout $pluginInterfaceTag
cd ../
Expand Down
7 changes: 7 additions & 0 deletions .circleci/setupAndTestWithFrontendWithDjango.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ echo -e "core,$1\nplugin-interface,$pluginInterfaceVersionXY" > modules.txt
./loadModules --ssh
cd supertokens-core
git checkout $coreTag

# Update oauth provider config in devConfig.yaml
sed -i 's/# oauth_provider_public_service_url:/oauth_provider_public_service_url: "http:\/\/localhost:4444"/' devConfig.yaml
sed -i 's/# oauth_provider_admin_service_url:/oauth_provider_admin_service_url: "http:\/\/localhost:4445"/' devConfig.yaml
sed -i 's/# oauth_provider_consent_login_base_url:/oauth_provider_consent_login_base_url: "http:\/\/localhost:3001\/auth"/' devConfig.yaml
sed -i 's/# oauth_client_secret_encryption_key:/oauth_client_secret_encryption_key: "asdfasdfasdfasdfasdf"/' devConfig.yaml

cd ../supertokens-plugin-interface
git checkout $pluginInterfaceTag
cd ../
Expand Down
7 changes: 7 additions & 0 deletions .circleci/setupAndTestWithFrontendWithDjango2x.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ echo -e "core,$1\nplugin-interface,$pluginInterfaceVersionXY" > modules.txt
./loadModules --ssh
cd supertokens-core
git checkout $coreTag

# Update oauth provider config in devConfig.yaml
sed -i 's/# oauth_provider_public_service_url:/oauth_provider_public_service_url: "http:\/\/localhost:4444"/' devConfig.yaml
sed -i 's/# oauth_provider_admin_service_url:/oauth_provider_admin_service_url: "http:\/\/localhost:4445"/' devConfig.yaml
sed -i 's/# oauth_provider_consent_login_base_url:/oauth_provider_consent_login_base_url: "http:\/\/localhost:3001\/auth"/' devConfig.yaml
sed -i 's/# oauth_client_secret_encryption_key:/oauth_client_secret_encryption_key: "asdfasdfasdfasdfasdf"/' devConfig.yaml

cd ../supertokens-plugin-interface
git checkout $pluginInterfaceTag
cd ../
Expand Down
7 changes: 7 additions & 0 deletions .circleci/setupAndTestWithFrontendWithDrfAsync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ echo -e "core,$1\nplugin-interface,$pluginInterfaceVersionXY" > modules.txt
./loadModules --ssh
cd supertokens-core
git checkout $coreTag

# Update oauth provider config in devConfig.yaml
sed -i 's/# oauth_provider_public_service_url:/oauth_provider_public_service_url: "http:\/\/localhost:4444"/' devConfig.yaml
sed -i 's/# oauth_provider_admin_service_url:/oauth_provider_admin_service_url: "http:\/\/localhost:4445"/' devConfig.yaml
sed -i 's/# oauth_provider_consent_login_base_url:/oauth_provider_consent_login_base_url: "http:\/\/localhost:3001\/auth"/' devConfig.yaml
sed -i 's/# oauth_client_secret_encryption_key:/oauth_client_secret_encryption_key: "asdfasdfasdfasdfasdf"/' devConfig.yaml

cd ../supertokens-plugin-interface
git checkout $pluginInterfaceTag
cd ../
Expand Down
7 changes: 7 additions & 0 deletions .circleci/setupAndTestWithFrontendWithDrfSync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ echo -e "core,$1\nplugin-interface,$pluginInterfaceVersionXY" > modules.txt
./loadModules --ssh
cd supertokens-core
git checkout $coreTag

# Update oauth provider config in devConfig.yaml
sed -i 's/# oauth_provider_public_service_url:/oauth_provider_public_service_url: "http:\/\/localhost:4444"/' devConfig.yaml
sed -i 's/# oauth_provider_admin_service_url:/oauth_provider_admin_service_url: "http:\/\/localhost:4445"/' devConfig.yaml
sed -i 's/# oauth_provider_consent_login_base_url:/oauth_provider_consent_login_base_url: "http:\/\/localhost:3001\/auth"/' devConfig.yaml
sed -i 's/# oauth_client_secret_encryption_key:/oauth_client_secret_encryption_key: "asdfasdfasdfasdfasdf"/' devConfig.yaml

cd ../supertokens-plugin-interface
git checkout $pluginInterfaceTag
cd ../
Expand Down
7 changes: 7 additions & 0 deletions .circleci/setupAndTestWithFrontendWithFlask.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ echo -e "core,$1\nplugin-interface,$pluginInterfaceVersionXY" > modules.txt
./loadModules --ssh
cd supertokens-core
git checkout $coreTag

# Update oauth provider config in devConfig.yaml
sed -i 's/# oauth_provider_public_service_url:/oauth_provider_public_service_url: "http:\/\/localhost:4444"/' devConfig.yaml
sed -i 's/# oauth_provider_admin_service_url:/oauth_provider_admin_service_url: "http:\/\/localhost:4445"/' devConfig.yaml
sed -i 's/# oauth_provider_consent_login_base_url:/oauth_provider_consent_login_base_url: "http:\/\/localhost:3001\/auth"/' devConfig.yaml
sed -i 's/# oauth_client_secret_encryption_key:/oauth_client_secret_encryption_key: "asdfasdfasdfasdfasdf"/' devConfig.yaml

cd ../supertokens-plugin-interface
git checkout $pluginInterfaceTag
cd ../
Expand Down
1 change: 1 addition & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ disable=raw-checker-failed,
no-else-raise,
too-many-nested-blocks,
broad-exception-raised,
too-many-public-methods,


# Enable the message, report, category or checker with the given id(s). You can
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [unreleased]

## [0.27.0] - 2024-12-30

- Added OAuth2Provider recipe
- Added support for FDIs: 4.0. Required by: auth-react >=0.48.0 and web-js>=0.14.0

## [0.26.1] - 2024-11-28

- Fixes dependency for docs build
Expand Down
2 changes: 1 addition & 1 deletion coreDriverInterfaceSupported.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"_comment": "contains a list of core-driver interfaces branch names that this core supports",
"versions": [
"5.1"
"5.2"
]
}
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ flask-cors==5.0.0
nest-asyncio==1.6.0
pdoc3==0.11.0
pylint==3.2.7
pyright==1.1.389
pyright==1.1.391
python-dotenv==1.0.1
pytest==8.3.3
pytest-asyncio==0.24.0
Expand Down
5 changes: 4 additions & 1 deletion examples/with-flask/with-thirdpartyemailpassword/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
dashboard,
emailverification,
session,
usermetadata,
thirdparty,
)
from supertokens_python.recipe.session import SessionContainer
from supertokens_python.recipe.session.framework.flask import verify_session

load_dotenv()
Expand Down Expand Up @@ -46,6 +48,7 @@ def get_website_domain():
session.init(),
dashboard.init(),
emailverification.init("REQUIRED"),
usermetadata.init(),
thirdparty.init(
sign_in_and_up_feature=thirdparty.SignInAndUpFeature(
providers=[
Expand Down Expand Up @@ -156,7 +159,7 @@ def get_website_domain():
@app.route("/sessioninfo", methods=["GET"]) # type: ignore
@verify_session()
def get_session_info():
session_: session.SessionContainer = g.supertokens
session_: SessionContainer = g.supertokens
return jsonify(
{
"sessionHandle": session_.get_handle(),
Expand Down
3 changes: 2 additions & 1 deletion frontendDriverInterfaceSupported.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"1.19",
"2.0",
"3.0",
"3.1"
"3.1",
"4.0"
]
}
2 changes: 1 addition & 1 deletion hooks/pre-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ then
git stash push -k -u -- ${files_to_stash} >/dev/null 2>/dev/null
fi

make check-lint >/dev/null 2>/dev/null
make check-lint
linted=$?

echo "$(tput setaf 3)* Properly linted?$(tput sgr 0)"
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@

setup(
name="supertokens_python",
version="0.26.1",
version="0.27.0",
author="SuperTokens",
license="Apache 2.0",
author_email="[email protected]",
Expand Down Expand Up @@ -127,6 +127,7 @@
"aiosmtplib>=1.1.6,<4.0.0",
"pkce<1.1.0",
"pyotp<3",
"python-dateutil<3",
],
python_requires=">=3.8",
include_package_data=True,
Expand Down
4 changes: 2 additions & 2 deletions supertokens_python/auth_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ async def check_auth_type_and_linking_status(
if session_user_result.status == "SHOULD_AUTOMATICALLY_LINK_FALSE":
if should_try_linking_with_session_user is True:
raise BadInputError(
"should_do_automatic_account_linking returned false when creating primary user but shouldTryLinkingWithSessionUser is true"
"shouldDoAutomaticAccountLinking returned false when making the session user primary but shouldTryLinkingWithSessionUser is true"
)
return OkFirstFactorResponse()
elif (
Expand Down Expand Up @@ -565,7 +565,7 @@ async def check_auth_type_and_linking_status(
if isinstance(should_link, ShouldNotAutomaticallyLink):
if should_try_linking_with_session_user is True:
raise BadInputError(
"should_do_automatic_account_linking returned false when creating primary user but shouldTryLinkingWithSessionUser is true"
"shouldDoAutomaticAccountLinking returned false when making the session user primary but shouldTryLinkingWithSessionUser is true"
)
return OkFirstFactorResponse()
else:
Expand Down
4 changes: 2 additions & 2 deletions supertokens_python/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

from __future__ import annotations

SUPPORTED_CDI_VERSIONS = ["5.1"]
VERSION = "0.26.1"
SUPPORTED_CDI_VERSIONS = ["5.2"]
VERSION = "0.27.0"
TELEMETRY = "/telemetry"
USER_COUNT = "/users/count"
USER_DELETE = "/user/remove"
Expand Down
2 changes: 2 additions & 0 deletions supertokens_python/framework/django/django_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ def get_cookie(self, key: str) -> Union[str, None]:

def get_header(self, key: str) -> Union[None, str]:
key = key.replace("-", "_")
if key.upper() in self.request.META:
return self.request.META.get(key.upper())
key = "HTTP_" + key
return self.request.META.get(key.upper())

Expand Down
Loading
Loading