-
Notifications
You must be signed in to change notification settings - Fork 42
feat: Add session claims feature #209
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
Merged
Merged
Changes from all commits
Commits
Show all changes
76 commits
Select commit
Hold shift + click to select a range
abba205
feat: Add primitive claim and its tests for session grants
KShivendu 349596a
feat: Add more functions related to session claims
KShivendu ed3a1cb
test: Add more tests for session claim features
KShivendu 6d297b0
feat: Wrap up features and tests related to basic session claims
KShivendu 9a0886c
feat: Refactor session claims and tests
KShivendu ef1b610
Merge pull request #211 from supertokens/feat/session-grants-refactor
KShivendu b984f64
test: Implement AsyncMock if not available and fix failing tests
KShivendu 597415c
test: Fix minor bug in @min_api_version test wrapper
KShivendu f74e97b
ci: Add debugging support in GH actions using tmate
KShivendu 4950367
ci: Run tmate only if tests fail
KShivendu ccf3dc6
fix: Import missing SessionRecipe to fix test failures
KShivendu 0dc1819
ci: Trigger tmate for debugging before tests if debug mode is enabled
KShivendu 1493aeb
test: Fix session claims test failures
KShivendu 76b1cc3
fix: Fix test failures for python3.7, use fixtures, and fix bugs
KShivendu f084a51
refactor: Extract SessionClaim related classes for easier inheritance…
KShivendu 583e820
refactor: Clean up session claims tests
KShivendu 45abb80
fix: Add pytest-mock to dev-requirements.txt
KShivendu 9f981c9
fix: Changes suggested in PR feedback
KShivendu e932be8
refactor: Make ClaimValidationResult an object instead of dict
KShivendu 54e2736
feat: Changes suggested in feedback
KShivendu a7e4b6a
feat: Add and use email verification claim
KShivendu 918e15f
feat: Add and use email verification claim
KShivendu 07fe952
fix: Fix lint errors and make email verification claims usable
KShivendu 29d7cee
refactor: Use email veriifcation claim in thirdparty recipe
KShivendu 6957000
refactor: Run black on tp recipe and use ev claim in pless recipe
KShivendu 44d0f3a
refactor: Remove email verification features from thirdpartyemailpass…
KShivendu 720f593
refactor: Remove email verification features from thirdpartypasswordl…
KShivendu e31b60d
refactor: Clean up usages of email verification in other recipes in f…
KShivendu 0834fe5
refactor: Fix circular dependency error in emailverification recipe a…
KShivendu 34e492a
test: Fix test failures related to tpep recipe
KShivendu 1586251
refactor: Allow emailverification init without directly using ParentR…
KShivendu 10395c4
tests: Fix test failures in tppless email delivery
KShivendu c26242e
feat: Changes suggested in feedback
KShivendu e77328e
feat: Apply claims on access_token_payload when calling create_new_se…
KShivendu 27282d4
changes based on feedback
KShivendu 3df9f16
Remove get_link_domain_and_path function and ev logic from other recipes
KShivendu dc9c3be
changes suggested in PR feedback
KShivendu 0ac965c
test invalid claims response with and without reason
KShivendu 3663a1d
fix test failure
KShivendu e58cb87
feat: Changes suggested in feedback
KShivendu 63eb59b
Merge branch 'feat/session-grants' into feat/ev-claim
KShivendu 619ac25
feat: Changes suggested in feedback
KShivendu 5b36b16
refactor: Remove ParentRecipeEmailVerificationConfig
KShivendu 01c2609
test: Fix failing tests
KShivendu 6fc90c6
refactor: Remove irrelevant comment
KShivendu a038414
Merge pull request #215 from supertokens/feat/ev-claim
rishabhpoddar 200e4c6
feat: Most of requested changes except the last two
KShivendu dac30f0
Merge branch 'feat/session-claim-remaining' into feat/session-grants
KShivendu 28392ee
feat: More of requested changes
KShivendu 2dca9c0
refactor:remaining changes
KShivendu 5eac706
feat: complete remaining items
KShivendu b103949
feat: changes suggested in feedback
KShivendu c18ba05
feat: More of requested changes
KShivendu 58255c1
feat: requested changes
KShivendu f35003c
feat: last changes
KShivendu aa37fe3
feat: remove commet
KShivendu e438cdf
feat: remove commet
KShivendu 9879067
Merge branch '0.10' into feat/session-grants
rishabhpoddar b013a5d
makes user context optional in syncio exposed functions for user roles
rishabhpoddar 0322472
feat: last changes
KShivendu 1c395a7
refactor: Serialize ClaimValidationError in default implementation of…
KShivendu 9138a41
test: Fix failing tests
KShivendu 0e3fd33
fix: emailverification syncio
KShivendu a000d3c
Merge pull request #221 from supertokens/feat/session-grants-new
rishabhpoddar 8f21297
test: session claims fix failing tests
KShivendu 23aacfc
test: Fix failing tests
KShivendu dc7390d
test: add tests for userroles claims
KShivendu af39f58
test: Fix failing tests
KShivendu 87595a4
feat: CHANGELOG
KShivendu 7065aed
fix: fix changelog
KShivendu aa1d35f
feat: update fdi version
KShivendu ba3f774
test: Add tests for primitive array claim
KShivendu e3fd8c9
feat: update fdi version
KShivendu 984dfc4
test: Fix failing tests
KShivendu 0283c00
feat: example app update for emailverification
KShivendu df5994f
Merge pull request #223 from supertokens/test/session-claims
rishabhpoddar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,5 +51,10 @@ jobs: | |
run: cd ../supertokens-root && ./loadModules | ||
- name: Setting up supertokens-root test environment | ||
run: cd ../supertokens-root && bash ./utils/setupTestEnvLocal | ||
- name: Debugging with tmate | ||
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | ||
uses: mxschmitt/[email protected] | ||
with: | ||
sudo: false | ||
rishabhpoddar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- name: Run tests | ||
run: make test | ||
run: make test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,3 +82,4 @@ uvicorn==0.18.2 | |
Werkzeug==2.0.3 | ||
wrapt==1.13.3 | ||
zipp==3.7.0 | ||
pytest-mock==3.8.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"_comment": "contains a list of frontend-driver interfaces branch names that this core supports", | ||
"versions": [ | ||
"1.14" | ||
"1.14", "1.15" | ||
] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. | ||
# | ||
# This software is licensed under the Apache License, Version 2.0 (the | ||
# "License") as published by the Apache Software Foundation. | ||
# | ||
# You may not use this file except in compliance with the License. You may | ||
# obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing permissions and limitations | ||
# under the License. | ||
|
||
from typing import Callable, List | ||
rishabhpoddar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
class PostSTInitCallbacks: | ||
"""Callbacks that are called after the SuperTokens instance is initialized.""" | ||
|
||
callbacks: List[Callable[[], None]] = [] | ||
|
||
@staticmethod | ||
def add_post_init_callback(cb: Callable[[], None]) -> None: | ||
PostSTInitCallbacks.callbacks.append(cb) | ||
|
||
@staticmethod | ||
def run_post_init_callbacks() -> None: | ||
for cb in PostSTInitCallbacks.callbacks: | ||
cb() | ||
|
||
PostSTInitCallbacks.callbacks = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.