All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Fixed an issues that threw 500 when changing password for user from dashboard
- Email template for verify email updated
- Adds search APIs to the dashboard recipe
- Adds a telemetry API to the dashboard recipe
- Update all example apps to initialise dashboard recipe
- Login with gitlab (single tenant only) and bitbucket
- Adds APIs and logic to the dashboard recipe to enable email password based login
- Fix expiry time of access token cookie.
- Email template updates
- The frontend SDK should be updated to a version supporting the header-based sessions!
- supertokens-auth-react: >= 0.31.0
- supertokens-web-js: >= 0.5.0
- supertokens-website: >= 16.0.0
- supertokens-react-native: >= 4.0.0
- supertokens-ios >= 0.2.0
- supertokens-android >= 0.3.0
- supertokens-flutter >= 0.1.0
- Only supporting FDI 1.16
- Added support for authorizing requests using the
Authorization
header instead of cookies- Added
get_token_transfer_method
config option - Check out https://supertokens.com/docs/thirdpartyemailpassword/common-customizations/sessions/token-transfer-method for more information
- Added
- Remove constraints on
werkzeug
version
- Add missing
original
attribute to flask response and remove logic for cases whereresponse
isNone
- Relax PyJWT version constraints supertokens#272
- Fix django cookie expiry time format to make it consistent with other frameworks: supertokens#267
- Updates dashboard version
- Updates user GET API for the dashboard recipe
- Fixes issue of sign up API not sending a
FIELD_ERROR
response in case of duplicate email: supertokens#264
- Fixes issue where if send_email is overridden with a different email, it will reset that email.
- APIs for user details to the dashboard recipe
- Updates dashboard version to 0.2
- Add tests for different scenarios while revoking session during session refresh call
- Remove
jsonschema
from package requirements
- Update session claims in email verification token generation API in case the session claims are outdated.
- Fix cookie_same_site for subdomains #239
- Add
to_json
method toClaimValidationError
class.
- Relaxes typing_extensions constraint
- Update frontend integration test servers for /angular and /testError tests
- Updated google token endpoint.
- Removed default
default_max_age
from session claim base classes - Added a 5 minute
default_max_age
to UserRoleClaim, PermissionClaim and EmailVerificationClaim - Fix Repetition of root_path in supertokens mididdlware for fastapi #230
- Email verification endpoints will now clear the session if called by a deleted/unknown user
- Adds dashboard recipe
- Added a
username
field to theSMTPSettings
model for passing custom SMTP server username.
- Made the
email
parameter optional inunverify_email
,revoke_email_verification_tokens
,is_email_verified
,verify_email_using_token
,create_email_verification_token
of theEmailVerification
recipe.
- Support for FDI 1.15
- Added support for session claims with related interfaces and classes.
- Added
on_invalid_claim
optional error handler to send InvalidClaim error responses. - Added
INVALID_CLAIMS
(InvalidClaimError
) toSessionErrors
. - Added
invalid_claim_status_code
optional config to set the status code of InvalidClaim errors. - Added
override_global_claim_validators
as param ofget_session
andverify_session
. - Added
merge_into_access_token_payload
to the Session recipe and session objects which should be preferred to the now deprecatedupdate_access_token_payload
. - Added
EmailVerificationClaim
,UserRoleClaim
andPermissionClaim
. These claims are now added to the access token payload by default by their respective recipes. - Added
assert_claims
,validate_claims_for_session_handle
,validate_claims_in_jwt_payload
to the Session recipe to support validation of the newly added claims. - Added
fetch_and_set_claim
,get_claim_value
,set_claim_value
andremove_claim
to the Session recipe to manage claims. - Added
assert_claims
,fetch_and_set_claim
,get_claim_value
,set_claim_value
andremove_claim
to session objects to manage claims. - Added session to the input of
generate_email_verify_token_post
,verify_email_post
,is_email_verified_get
. - Adds default userContext for verifySession calls that contains the request object.
- Removes support for FDI <= 1.14
- Changed
sign_in_up
third party recipe function to accept just the email asstr
(removedemail_verified: bool
). - The frontend SDK should be updated to a version supporting session claims!
- supertokens-auth-react: >= 0.25.0
- supertokens-web-js: >= 0.2.0
EmailVerification
recipe is now not initialized as part of auth recipes, it should be added to therecipe_list
directly instead usingemailverification.init()
.- Email verification related overrides (
email_verification_feature
attr ofoverride
) moved from auth recipes into theEmailVerification
recipe config. - Email verification related configs (
email_verification_feature
attr) moved from auth recipes into theEmailVerification
config object root. - ThirdParty recipe no longer takes
email_delivery
config. useemailverification
recipe'semail_delivery
instead. - Moved email verification related configs from the
email_delivery
config of auth recipes into a separateEmailVerification
email delivery config. - Updated return type of
get_email_for_user_id
in theEmailVerification
recipe config. It should now return an object with status. - Removed
get_reset_password_url
,get_email_verification_url
,get_link_domain_and_path
. Changing these urls can be done in the email delivery configs instead. - Removed
unverify_email
,revoke_email_verification_tokens
,is_email_verified
,verify_email_using_token
andcreate_email_verification_token
from auth recipes. These should be called on theEmailVerification
recipe instead. - Changed function signature for email verification APIs to accept a session as an input.
- Changed Session API interface functions:
refresh_post
now returns a Session container object.sign_out_post
now takes in an optional session object as a parameter.
Before:
from supertokens_python import init, SupertokensConfig, InputAppInfo
from supertokens_python.recipe import emailpassword
from supertokens_python.recipe.emailverification.utils import OverrideConfig
init(
supertokens_config=SupertokensConfig("..."),
app_info=InputAppInfo("..."),
framework="...",
recipe_list=[
emailpassword.init(
# these options should be moved into the EmailVerification config:
email_verification_feature=emailpassword.InputEmailVerificationConfig("..."),
override=emailpassword.InputOverrideConfig(
email_verification_feature=OverrideConfig(
# these overrides should be moved into the EmailVerification overrides
"..."
)
),
),
],
)
After the update:
from supertokens_python import init, SupertokensConfig, InputAppInfo
from supertokens_python.recipe import emailpassword, emailverification
init(
supertokens_config=SupertokensConfig("..."),
app_info=InputAppInfo("..."),
framework="...",
recipe_list=[
emailverification.init(
"...", # EmailVerification config
override=emailverification.OverrideConfig(
# overrides
"..."
),
),
emailpassword.init(),
],
)
If you turn on email verification your email-based passwordless users may be redirected to an email verification screen in their existing session. Logging out and logging in again will solve this problem or they could click the link in the email to verify themselves.
You can avoid this by running a script that will:
- list all users of passwordless
- create an emailverification token for each of them if they have email addresses
- user the token to verify their address
Something similar to this script:
from supertokens_python import init, SupertokensConfig, InputAppInfo
from supertokens_python.recipe import passwordless, emailverification, session
from supertokens_python.recipe.passwordless import ContactEmailOrPhoneConfig
from supertokens_python.syncio import get_users_newest_first
from supertokens_python.recipe.emailverification.syncio import create_email_verification_token, verify_email_using_token
from supertokens_python.recipe.emailverification.interfaces import CreateEmailVerificationTokenOkResult
init(
supertokens_config=SupertokensConfig("http://localhost:3567"),
app_info=InputAppInfo(
app_name="SuperTokens Demo",
api_domain="https://api.supertokens.io",
website_domain="supertokens.io",
),
framework="fastapi",
recipe_list=[
emailverification.init("REQUIRED"),
passwordless.init(
contact_config=ContactEmailOrPhoneConfig(),
flow_type="USER_INPUT_CODE_AND_MAGIC_LINK",
),
session.init(),
],
)
def verify_email_for_passwordless_users():
pagination_token = None
done = False
while not done:
res = get_users_newest_first(
limit=100,
pagination_token=pagination_token,
include_recipe_ids=["passwordless"]
)
for user in res.users:
if user.email is not None:
token_res = create_email_verification_token(user.user_id, user.email)
if isinstance(token_res, CreateEmailVerificationTokenOkResult):
verify_email_using_token(token_res.token)
done = res.next_pagination_token is None
if not done:
pagination_token = res.next_pagination_token
verify_email_for_passwordless_users()
The UserRoles
recipe now adds role and permission information into the access token payload by default. If you are already doing this manually, this will result in duplicate data in the access token.
- You can disable this behaviour by setting
skip_adding_roles_to_access_token
andskip_adding_permissions_to_access_token
to true in the recipe init. - Check how to use the new claims in the updated guide: https://supertokens.com/docs/userroles/protecting-routes
- Add support for User ID Mapping using
create_user_id_mapping
,get_user_id_mapping
,delete_user_id_mapping
,update_or_delete_user_id_mapping
functions
- Send FORM_FIELD error with 200 status code instead of 500 on invalid request body or when user passes non-string values as email ID for
/auth/signin
- Add to test to ensure that overrides are applying correctly in methods called on SessionContainer instances
- Make
user_context
optional in userroles recipe syncio functions.
- Added
pdoc
template files to project insidedocs-templates
directory - Updated
build-docs
in Makefile to usedocs-templates
as the template directory while generating docs usingpdoc
- Updated
html.mako
template to have a singleh1
tag and have a default meta description tag
- Relax version requirements for
httpx
,cryptography
, andasgiref
to fix supertokens#207
- Update tests to cover
resend_code
feature inpasswordless
andthirdpartypasswordless
recipe. - Update usermetadata tests to ensure that utf8 chars are supported.
- Mark tests as skipped if core version requirements are not met.
- Use black instead of
autopep8
to format code. - Add frontend integration tests for
django2x
- Clears cookies when
revoke_session
is called using the session container, even if the session did not exist from before: supertokens/supertokens-node#343
- Change request arg type in session recipe functions from Any to BaseRequest.
- Changes session function recipe interfaces to not throw an
UNAUTHORISED
error when the input is a session_handle: https://github.com/supertokens/backend/issues/83get_session_information
now returnsNone
if the session does not exist.update_session_data
now returnsFalse
if the inputsession_handle
does not exist.update_access_token_payload
now returnsFalse
if the inputsession_handle
does not exist.regenerate_access_token
now returnsNone
if the input access token'ssession_handle
does not exist.- The
session_class
functions have not changed in behaviour and still throwUNAUTHORISED
error. This works cause thesession_class
works on the current session and not some other session.
- Adds default
user_context
for API calls that contains the request object. It can be used in APIs / functions override like this:
def apis_override_email_password(param: APIInterface):
og_sign_in_post = param.sign_in_post
async def sign_in_post(
form_fields: List[FormField],
api_options: APIOptions,
user_context: Dict[str, Any],
):
req = user_context.get("_default", {}).get("request")
if req:
# do something with the request
return await og_sign_in_post(form_fields, api_options, user_context)
param.sign_in_post = sign_in_post
return param
def functions_override_email_password(param: RecipeInterface):
og_sign_in = param.sign_in
async def sign_in(email: str, password: str, user_context: Dict[str, Any]):
req = user_context.get("_default", {}).get("request")
if req:
# do something with the request
return await og_sign_in(email, password, user_context)
param.sign_in = sign_in
return param
init(
...,
recipe_list=[
emailpassword.init(
override=emailpassword.InputOverrideConfig(
apis=apis_override_email_password,
functions=functions_override_email_password,
)
),
session.init(),
],
)
- Add more details in the
CONTRIBUTING.md
to make it beginner friendly.
- Introduce
userroles
recipe.
from supertokens_python import InputAppInfo, SupertokensConfig, init
from supertokens_python.recipe import userroles
from supertokens_python.recipe.userroles.asyncio import create_new_role_or_add_permissions, add_role_to_user
init(
supertokens_config=SupertokensConfig('http://localhost:3567'),
app_info=InputAppInfo(
app_name='SuperTokens Demo',
api_domain='https://api.supertokens.io',
website_domain='supertokens.io'
),
framework='flask',
recipe_list=[userroles.init()]
)
user_id = "userId"
role = "role"
permissions = ["perm1", "perm2"]
# Functions to use inside your views:
# Create a new role with a few permissions:
result = await create_new_role_or_add_permissions(role, permissions)
# Add role to the user:
result = await add_role_to_user(user_id, role)
# Check documentation for more examples..
- Fixes Cookie same_site config validation.
- Remove
<Recipe>(Email|SMS)TemplateVars
in favour of(Email|SMS)TemplateVars
for better DX.
- supertokens/supertokens-node#220
- Adds
{status: "GENERAL_ERROR", message: string}
as a possible output to all the APIs. - Changes
FIELD_ERROR
output status in third party recipe API to beGENERAL_ERROR
. - Replaced
FIELD_ERROR
status type in third party signinup API withGENERAL_ERROR
. - Removed
FIELD_ERROR
status type from third party signinup recipe function.
- Adds
- If sms or email sending failed in passwordless recipe APIs, we now throw a regular JS error from the API as opposed to returning a
GENERAL_ERROR
to the client. - If there is an error whilst getting the profile info about a user from a third party provider (in /signinup POST API), then we throw a regular JS error instead of returning a
GENERAL_ERROR
to the client. - Make email and sms delivery ingredient interfaces developer friendly:
- Remove the need of
SMSDeliveryTwilioConfig
,EmailDeliverySMTPConfig
, andSupertokensServiceConfig
. - Export
(.*)OverrideInput
and(Email|SMS)DeliveryOverrideInput
from the relevant recipes. - Rename
Type<Recipe>EmailDeliveryInput
to<Recipe>EmailTemplateVars
- Export
EmailTemplateVars
(alias of<Recipe>EmailTemplateVars
) from all the relevant recipes - Export
PasswordlessLogin(Email|SMS)TemplateVars
,PasswordResetEmailTemplateVars
, andVerificationEmailTemplateVars
from relevant recipes. - Rename
(.*)ServiceConfig
to(.*)Settings
for readability. - Rename arg
input_
totemplate_vars
inEmailDeliveryInterface.send_email
andSMTPServiceInterface.send_sms
functions. - Rename arg
input_
tocontent
andtemplate_vars
inSMTPServiceInterface.send_raw_email
andSMTPServiceInterface.get_content
functions respectively. - Rename arg
get_content_result
tocontent
andinput_
totemplate_vars
inTwilioServiceInterface.send_raw_email
andTwilioServiceInterface.get_content
functions respectively.
- Remove the need of
- Removes support for FDI < 1.14
- Changes
get_email_for_user_id
function inside thirdpartypasswordless to take into account passwordless emails and return an empty string in case a passwordless email doesn't exist. This helps situations where the dev wants to customise the email verification functions in the thirdpartypasswordless recipe.
email_delivery
user config for Emailpassword, Thirdparty, ThirdpartyEmailpassword, Passwordless and ThirdpartyPasswordless recipes.sms_delivery
user config for Passwordless and ThirdpartyPasswordless recipes.Twilio
service integartion forsms_delivery
ingredient.SMTP
service integration foremail_delivery
ingredient.Supertokens
service integration forsms_delivery
ingredient.
- For Emailpassword recipe input config,
reset_password_using_token_feature.create_and_send_custom_email
andemail_verification_feature.create_and_send_custom_email
have been deprecated. - For Thirdparty recipe input config,
email_verification_feature.create_and_send_custom_email
has been deprecated. - For ThirdpartyEmailpassword recipe input config,
reset_password_using_token_feature.create_and_send_custom_email
andemail_verification_feature.create_and_send_custom_email
have been deprecated. - For Passwordless recipe input config,
create_and_send_custom_email
andcreateAndSendCustomTextMessage
have been deprecated. - For ThirdpartyPasswordless recipe input config,
create_and_send_custom_email
,createAndSendCustomTextMessage
andemail_verification_feature.create_and_send_custom_email
have been deprecated.
Following is an example of ThirdpartyPasswordless recipe migration. If your existing code looks like
from supertokens_python import InputAppInfo, SupertokensConfig, init
from supertokens_python.recipe import thirdpartypasswordless
async def send_pless_login_email(input_: TypePasswordlessEmailDeliveryInput, user_context: Dict[str, Any]):
print("SEND_PLESS_LOGIN_EMAIL", input_.email, input_.user_input_code)
async def send_pless_login_sms(input_: TypeThirdPartyPasswordlessSmsDeliveryInput, user_context: Dict[str, Any]):
print("SEND_PLESS_LOGIN_SMS", input_.phone_number, input_.user_input_code)
async def send_ev_verification_email(user: TpPlessUser, link: str, user_context: Any):
print("SEND_EV_LOGIN_SMS", user.email, user.phone_number, user.third_party_info)
init(
supertokens_config=SupertokensConfig('http://localhost:3567'),
app_info=InputAppInfo(
api_domain="...",
app_name="...",
website_domain="...",
),
framework='...',
recipe_list=[thirdpartypasswordless.init(
contact_config=passwordless.ContactEmailOrPhoneConfig(
create_and_send_custom_email=send_pless_login_email,
create_and_send_custom_text_message=send_pless_login_sms,
),
flow_type='...',
email_verification_feature=thirdpartypasswordless.InputEmailVerificationConfig(
create_and_send_custom_email=send_ev_verification_email,
)
)]
)
After migration to using new email_delivery
and sms_delivery
config, your code would look like:
from supertokens_python import InputAppInfo, SupertokensConfig, init
from supertokens_python.ingredients.emaildelivery.types import EmailDeliveryInterface, EmailDeliveryConfig
from supertokens_python.ingredients.smsdelivery.types import SMSDeliveryInterface, SMSDeliveryConfig
from supertokens_python.recipe import thirdpartypasswordless, passwordless
from supertokens_python.recipe.emailverification.types import TypeEmailVerificationEmailDeliveryInput
async def send_pless_login_email(input_: TypePasswordlessEmailDeliveryInput, user_context: Dict[str, Any]):
print("SEND_PLESS_LOGIN_EMAIL", input_.email, input_.user_input_code)
async def send_pless_login_sms(input_: TypeThirdPartyPasswordlessSmsDeliveryInput, user_context: Dict[str, Any]):
print("SEND_PLESS_LOGIN_SMS", input_.phone_number, input_.user_input_code)
async def send_ev_verification_email(user: TpPlessUser, link: str, user_context: Any):
print("SEND_EV_LOGIN_SMS", user.email, user.phone_number, user.third_party_info)
class EmailDeliveryService(EmailDeliveryInterface):
async def send_email(self, input_: TypeThirdPartyPasswordlessEmailDeliveryInput, user_context: Dict[str, Any]):
if isinstance(input_, TypeEmailVerificationEmailDeliveryInput):
await send_ev_verification_email(input_, user_context)
elif isinstance(input_, TypePasswordlessEmailDeliveryInput):
await send_pless_login_email(input_, user_context)
class SMSDeliveryService(SMSDeliveryInterface):
async def send_sms(self, input_: TypeThirdPartyPasswordlessSmsDeliveryInput, user_context: Dict[str, Any]):
await send_pless_login_sms(input_, user_context)
init(
supertokens_config=SupertokensConfig('http://localhost:3567'),
app_info=InputAppInfo(
app_name="...",
api_domain="...",
website_domain="...",
),
framework='...',
recipe_list=[thirdpartypasswordless.init(
contact_config=passwordless.ContactEmailOrPhoneConfig(),
flow_type='...',
email_delivery=EmailDeliveryConfig(
service=EmailDeliveryService(),
),
sms_delivery=SMSDeliveryConfig(
service=SMSDeliveryService(),
),
)]
)
- Fix bugs in syncio functions across all the recipes
- Fixes bug in resend code POST API in passwordless recipe to use the correct instance type during checks.
- Fixes bug in thirdpartypasswordless recipe to prevent infinite loop during resent code API
- Update phonenumbers lib dependency version
- Adds type checks to the parameters of the emailpassword init funtion.
- Adds type checks to the parameters of the emailverification init funtion.
- Adds type checks to the parameters of the jwt init funtion.
- Adds type checks to the parameters of the openid init funtion.
- Adds type checks to the parameters of the session init funtion.
- Adds type checks to the parameters of the passwordless init funtion.
- Adds type checks to the parameters of the thirdparty init funtion.
- Adds type checks to the parameters of the thirdpartyemailpassword init funtion.
- Adds type checks to the parameters of the thirdpartypasswordless init funtion.
- Adds type checks to the parameters of the usermetadata init funtion.
- Adds django with thirdpartyemailpassword example.
- Fixed execute_async to check and use asyncio mode.
- Ignores any exception from send_telemetry, not to prevent the app from starting up.
- Updates
RecipeInterface
andAPIInterface
methods to return exact return types instead of abstract base types, for the emailpassword recipe. - Updates
RecipeInterface
andAPIInterface
methods to return exact return types instead of abstract base types, for the thirdparty recipe. - Updates
RecipeInterface
andAPIInterface
methods to return exact return types instead of abstract base types, for the passwordless recipe. - Updates
RecipeInterface
andAPIInterface
methods to return exact return types instead of abstract base types, for the openid recipe. - Updates
RecipeInterface
andAPIInterface
methods to return exact return types instead of abstract base types, for the JWT recipe. - Updates
RecipeInterface
andAPIInterface
methods to return exact return types instead of abstract base types, for the session recipe. - Updates
RecipeInterface
methods to return exact return types instead of abstract base types, for the usermetadata recipe. - Adds
EmailPasswordSignInOkResult
,EmailPasswordSignUpOkResult
andThirdPartySignInUpOkResult
to use the thirdpartyemailpassword recipe'sUser
class. - Adds
ThirdPartySignInUpPostOkResult
,EmailPasswordSignInPostOkResult
andEmailPasswordSignUpPostOkResult
to use the thirdpartyemailpassword recipe'sUser
class. - Renames wrongly named
ResetPasswordUsingTokenWrongUserIdErrorResult
toResetPasswordUsingTokenInvalidTokenError
, one of the return types ofreset_password_using_token
method in theRecipeInterface
. - Removes unused classes
GeneratePasswordResetTokenResponse
,EmailExistsResponse
andPasswordResetResponse
. - Removed
third_party_info
from emailpasswordUser
class. - Exports re-used Result and Response classes from
thirdparty
&emailpassword
recipe interfaces in thethirdpartyemailpassword
recipe interfaces. - Exports re-used Result and Response classes from
thirdparty
&passwordless
recipe interfaces in thethirdpartypasswordless
recipe interfaces. - Renames
*ErrorResult
classes to*Error
. - Renames
*ErrorResponse
classes to*Error
. - Renames
*OkResponse
classes to*OkResult
. - Renames
*ResultOk
classes to*OkResult
.
- Fixed execute_async to check and use asyncio mode.
- Ignores any exception from send_telemetry, not to prevent the app from starting up.
- Bug fix in telemetry data API
- Updates Project Setup, Modifying Code and Testing sections in the contributing guide
- Fixed async execution of
send_telemetry
in init andcall_get_handshake_info
in session recipe implementation. - Fixed
Content-length
in FastAPI Response wrapper.
- Changes third party provider type to get client ID dynamically so that it can be changed based on user context.
- Adds delete email (
delete_email_for_user
) and phone number (delete_phone_number_for_user
) functions for passwordless and thirdpartypasswordless recipe - Adds check for user type in update passwordless info in thirdpartypasswordless recipe
- Fixes issue in user metadata recipe where as are exposing async functions in the syncio file.
- Upgrade and freeze pyright version
- Rename
compare_version
toget_max_version
for readability - Add user metadata recipe
- bug fix in
default_create_and_send_custom_email
for emailverification recipe where we were not sending the email if env var was not set. - Fix telemetry issues related to asyncio when using FastAPI. Related issue: supertokens/supertokens-core#421
- adds git action for running tests
- Setup logging for easier debugging
- Adds github action for checking all things checked by pre commit hook
- Fix Passwordless OTP recipe phone number field to fix supertokens/supertokens-core#416
- Expands allowed version range for httpx library to fix supertokens#98
- Removes dependency on framework specific dependencies (
werkzeug
andstarlette
)
- Import for fastapi middleware:
- Old
from supertokens_python.framework.fastapi import Middleware app = FastAPI() app.add_middleware(Middleware)
- New
from supertokens_python.framework.fastapi import get_middleware app = FastAPI() app.add_middleware(get_middleware())
- Old
user_context
was passed incorrectly to thecreate_new_session_function
.
- Bug in user pagination functions: supertokens#95
- supertokens#90
- Thirdpartypasswordless recipe + tests
- Added new function to BaseRequest class called
set_session_as_none
to set session object to None.
- Bug where a user had to add dependencies on all frameworks when using the SDK: supertokens#82
- User context property added for all recipes' apis and functions
- Removes deprecated functions in recipe for user pagination and user count
- Changed email verification input functions' user type in emailpassword to be equal to emailpassword's user and not emailverification user.
- All session recipe's error handler not need to return
BaseResponse
. - Session's recipe
get_session_information
returns aSessionInformationResult
class object instead of adict
for easier consumption. get_link_domain_and_path
config in passwordless recipe now takes a class type input as opposed to a string input as the first param- Renamed
Session
toSessionContainer
in session - Upgrades
typing_extensions
to version 4.1.1 - Renames functions in ThirdPartyEmailPassword recipe (supertokens/supertokens-node#219):
- Recipe Interface:
sign_in_up
->thirdparty_sign_in_up
sign_up
->emailpassword_sign_up
sign_in
->emailpassword_sign_in
- API Interface:
email_exists_get
->emailpassword_email_exists_get
- User exposed functions (in
recipe/thirdpartyemailpassword/asyncio
andrecipe/thirdpartyemailpassword/syncio
)sign_in_up
->thirdparty_sign_in_up
sign_up
->emailpassword_sign_up
sign_in
->emailpassword_sign_in
- Recipe Interface:
- Returns session from all APIs where a session is created
- Added
regenerate_access_token
as a new recipe function for the session recipe. - Strong typings.
- Changed async_to_sync_wrapper.py file to make it simpler
- Remove default
= None
for functions internal to the package
- If logging in via social login and the email is already verified from the provider's side, it marks the email as verified in SuperTokens core.
- Corrects how override is done in thirdpartyemailpassword recipe and API implementation
- add workflow to verify if pr title follows conventional commits
- Added userId as an optional property to the response of
recipe/user/password/reset
(compatibility with CDI 2.12). - Adds ability to give a path for each of the hostnames in the connectionURI: supertokens/supertokens-node#252
- Bug fixes in Literal import which caused issues when using the sdk with python version 3.7.
- Fixes supertokens/supertokens-node#244 - throws an error if a user tries to update email / password of a third party login user.
- Adds passwordless recipe
- Adds compatibility with FDI 1.12 and CDI 2.11
- Bug in ThirdpartyEmailpassword recipe init function when InputSignUpFeature is not passed.
- delete_user function
- Compatibility with CDI 2.10
- Config changes
- Added
mode
config for FastAPI which now supports bothasgi
andwsgi
. - The ability to enable JWT creation with session management, this allows easier integration with services that require JWT based authentication: supertokens/supertokens-core#250
- You can do BaseRequest.request to get the original request object. Fixes #61
- Removes use of apiGatewayPath from apple's redirect URI since that is already there in the apiBasePath
- Sign in with Discord, Google workspaces.
- Allow sending of custom response: supertokens/supertokens-node#197
- Change
set_content
toset_json_content
in all the frameworks - Adds
"application/json; charset=utf-8"
header to json responses.
- When routing, ignores
rid
value"anti-csrf"
: supertokens#54 get_redirect_uri
function added to social providers in case we set theredirect_uri
on the backend.- Adds optional
is_default
param to auth providers so that they can be reused with different credentials. - Verifies ID Token sent for sign in with apple as per https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_rest_api/verifying_a_user
- Removes empty awslambda folder from framework
- If json parsing fails in the frameworks, catches those exceptions and returns an empty object.
- Removes
sign_in_up_post
from thirdpartyemailpassword API interface and replaces it with three APIs:email_password_sign_in_post
,email_password_sign_up_post
andthird_party_sign_in_up_post
: supertokens/supertokens-node#192 - Renames all "jwt" related functions in session recipe to use "access_token" instead
- jwt recipe and unit tests
- Support for FDI 1.10: Allow thirdparty
/signinup POST
API to takeauthCodeResponse
XORcode
so that it can supprt OAuth via PKCE - Apple provider disabled for now
- Bug fix: supertokens#42
- Bug fix: supertokens#10
- Bug fix: supertokens#13
- all the user facing async functions now needs to be imported from asyncio sub directory. For example, importing the async implementation of create_new_session from session recipe has changed from:
to:
from supertokens_python.recipe.session import create_new_session
from supertokens_python.recipe.session.asyncio import create_new_session
- sync versions of the functions are now needs to be imported from syncio directory instead of the sync directory
- all the license comments now uses single line comment structure instead of multi-line comment structure
- auth-react tests for flask and django
- if running django in async way, set
mode
toasgi
inconfig
- Adds OAuth development keys for Google and Github for faster recipe implementation.
- Removed the Literal from python 3.8 and added Literal from typing_extensions package. Now supertokens_python can be used with python 3.7 .
- dependency issues for frameworks
- Multiple framework support. Currently supporting Django, Flask(1.x) and Fastapi.
- BaseRequest and BaseResponse interfaces which are used inside recipe instead of previously used Response and Request from Fastapi.
- Middleware, error handlers and verify session for each framework.
- Created a wrapper for async to sync for supporting older version of python web frameworks.
- Base tests for each framework.
- New requirements in the setup file.