Skip to content

Commit 94fef52

Browse files
committed
Merge branch '0.11' into feat/dashboard-user-details
2 parents fee5ff4 + 1533474 commit 94fef52

File tree

4 files changed

+327
-8
lines changed

4 files changed

+327
-8
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
- APIs for user details to the dashboard recipe
1212

1313
### Changed:
14-
- Updates dashboard version to 0.2
14+
- Updates dashboard version to 0.2
15+
- Add tests for different scenarios while revoking session during session refresh call
1516

1617
## [0.11.7] - 2022-11-21
1718

html/supertokens_python/constants.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ <h1 class="title">Module <code>supertokens_python.constants</code></h1>
4040
# License for the specific language governing permissions and limitations
4141
# under the License.
4242
SUPPORTED_CDI_VERSIONS = [&#34;2.9&#34;, &#34;2.10&#34;, &#34;2.11&#34;, &#34;2.12&#34;, &#34;2.13&#34;, &#34;2.14&#34;, &#34;2.15&#34;]
43-
VERSION = &#34;0.11.6&#34;
43+
VERSION = &#34;0.11.7&#34;
4444
TELEMETRY = &#34;/telemetry&#34;
4545
USER_COUNT = &#34;/users/count&#34;
4646
USER_DELETE = &#34;/user/remove&#34;
4747
USERS = &#34;/users&#34;
48-
TELEMETRY_SUPERTOKENS_API_URL = &#34;https://api.supertokens.io/0/st/telemetry&#34;
48+
TELEMETRY_SUPERTOKENS_API_URL = &#34;https://api.supertokens.com/0/st/telemetry&#34;
4949
TELEMETRY_SUPERTOKENS_API_VERSION = &#34;2&#34;
5050
ERROR_MESSAGE_KEY = &#34;message&#34;
5151
API_KEY_HEADER = &#34;api-key&#34;

html/supertokens_python/recipe/emailverification/recipe.html

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,12 +448,25 @@ <h1 class="title">Module <code>supertokens_python.recipe.emailverification.recip
448448
if isinstance(
449449
response, CreateEmailVerificationTokenEmailAlreadyVerifiedError
450450
):
451+
if await session.get_claim_value(EmailVerificationClaim) is not True:
452+
# this can happen if the email was &#34;verified&#34; in another browser
453+
# and this session is still outdated - and the user has not
454+
# called the get email verification API yet.
455+
await session.fetch_and_set_claim(
456+
EmailVerificationClaim, user_context
457+
)
451458
log_debug_message(
452459
&#34;Email verification email not sent to %s because it is already verified.&#34;,
453460
email_info.email,
454461
)
455462
return GenerateEmailVerifyTokenPostEmailAlreadyVerifiedError()
456463

464+
if await session.get_claim_value(EmailVerificationClaim) is not False:
465+
# this can happen if the email was &#34;unverified&#34; in another browser
466+
# and this session is still outdated - and the user has not
467+
# called the get email verification API yet.
468+
await session.fetch_and_set_claim(EmailVerificationClaim, user_context)
469+
457470
email_verify_link = (
458471
api_options.app_info.website_domain.get_as_string_dangerous()
459472
+ api_options.app_info.website_base_path.get_as_string_dangerous()
@@ -626,12 +639,25 @@ <h2 class="section-title" id="header-classes">Classes</h2>
626639
if isinstance(
627640
response, CreateEmailVerificationTokenEmailAlreadyVerifiedError
628641
):
642+
if await session.get_claim_value(EmailVerificationClaim) is not True:
643+
# this can happen if the email was &#34;verified&#34; in another browser
644+
# and this session is still outdated - and the user has not
645+
# called the get email verification API yet.
646+
await session.fetch_and_set_claim(
647+
EmailVerificationClaim, user_context
648+
)
629649
log_debug_message(
630650
&#34;Email verification email not sent to %s because it is already verified.&#34;,
631651
email_info.email,
632652
)
633653
return GenerateEmailVerifyTokenPostEmailAlreadyVerifiedError()
634654

655+
if await session.get_claim_value(EmailVerificationClaim) is not False:
656+
# this can happen if the email was &#34;unverified&#34; in another browser
657+
# and this session is still outdated - and the user has not
658+
# called the get email verification API yet.
659+
await session.fetch_and_set_claim(EmailVerificationClaim, user_context)
660+
635661
email_verify_link = (
636662
api_options.app_info.website_domain.get_as_string_dangerous()
637663
+ api_options.app_info.website_base_path.get_as_string_dangerous()
@@ -740,12 +766,25 @@ <h3>Methods</h3>
740766
if isinstance(
741767
response, CreateEmailVerificationTokenEmailAlreadyVerifiedError
742768
):
769+
if await session.get_claim_value(EmailVerificationClaim) is not True:
770+
# this can happen if the email was &#34;verified&#34; in another browser
771+
# and this session is still outdated - and the user has not
772+
# called the get email verification API yet.
773+
await session.fetch_and_set_claim(
774+
EmailVerificationClaim, user_context
775+
)
743776
log_debug_message(
744777
&#34;Email verification email not sent to %s because it is already verified.&#34;,
745778
email_info.email,
746779
)
747780
return GenerateEmailVerifyTokenPostEmailAlreadyVerifiedError()
748781

782+
if await session.get_claim_value(EmailVerificationClaim) is not False:
783+
# this can happen if the email was &#34;unverified&#34; in another browser
784+
# and this session is still outdated - and the user has not
785+
# called the get email verification API yet.
786+
await session.fetch_and_set_claim(EmailVerificationClaim, user_context)
787+
749788
email_verify_link = (
750789
api_options.app_info.website_domain.get_as_string_dangerous()
751790
+ api_options.app_info.website_base_path.get_as_string_dangerous()

0 commit comments

Comments
 (0)