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

11 adapt to reference implementation #12

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

alexbalakirev
Copy link
Collaborator

@corbadoman Ready for review. To make a deployment for the new version I need CORBADO_FRONTEND_API secret. After that I could update the example applications if needed.

@alexbalakirev alexbalakirev self-assigned this Oct 27, 2024
@alexbalakirev alexbalakirev linked an issue Oct 27, 2024 that may be closed by this pull request
10 tasks
@@ -49,8 +49,10 @@ jobs:
tox run
env:
CORBADO_BACKEND_API: ${{ vars.CORBADO_BACKEND_API }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please the following order: project id, api secret, frontend api, backend api

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

backend_api (str): The base URL for the backend API. Defaults to "https://backendapi.cloud.corbado.io/v2".
short_session_cookie_name (str): The name of the cookie for short session management. Defaults to "cbo_short_session".
backend_api (str): The base URL for the backend API.
frontend_api (str): The base URL for the frontend API.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

frontend api before backend api

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

short_session_cookie_name (str): The name of the cookie for short session management. Defaults to "cbo_short_session".
backend_api (str): The base URL for the backend API.
frontend_api (str): The base URL for the frontend API.
session_token_cookie_name (str): The name of the cookie for short session management. Defaults to "cbo_session_token".
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can remove this, we should not need that anymore

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

@@ -70,9 +70,10 @@ def sessions(self) -> SessionService:
"""
if not self._sessions:
self._sessions = SessionService(
short_session_cookie_name=self.config.short_session_cookie_name,
session_token_cookie_name=self.config.session_token_cookie_name,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

ISSUER_MISSMATCH (str): Indicates that the token issuer does not match the expected issuer.
"""

INVALID_TOKEN = "Invalid token" # noqa s105
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldnot we have the following codes like in go:

CodeJWTGeneral Code = iota
CodeJWTIssuerMismatch
CodeJWTInvalidData
CodeJWTInvalidSignature
CodeJWTBefore
CodeJWTExpired
CodeJWTIssuerEmpty

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, but due to different JWT implementation in Java and Python and error handling not all abovementioned error may get caught.

@lukaskratzel
Copy link

@alexbalakirev How can I use this version in my test project? Did you release it under some pre-release tag?

@alexbalakirev
Copy link
Collaborator Author

@alexbalakirev How can I use this version in my test project? Did you release it under some pre-release tag?

@lukaskratzel You can use/install this branch locally. Since this PR is not merged/reviewed, I have not deployed this version on PyPI. This branch has version 2.0.0 (as in VERSION file). You can use following command to install local version of the project (in this case SDK):
python -m pip install -e "path/to/sdk/project/root
Make sure your requirements.txt from example project has dependency on: passkeys >= 2.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adapt to reference implementation
3 participants