-
Notifications
You must be signed in to change notification settings - Fork 189
refactor: improved login flow #56
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
Conversation
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
- Added a margin of 1px to the GitHubButton for better spacing. - Reduced font size from 1.05rem to 0.8rem for a more compact appearance.
- Added Redis service to docker-compose for session storage. - Implemented Redis connection in config.py and updated session management functions. - Refactored dependencies to utilize Redis for session retrieval and deletion. - Updated requirements.txt to include Redis library.
- Added functions to check if the access token is expired and to refresh the token using the refresh token. - Updated dependencies to utilize the new token management functions in the authentication flow. - Enhanced the login endpoint to support session management with token state.
- Implemented a new GET endpoint `/count` to return the number of active sessions stored in Redis. - The endpoint requires authentication and returns a dictionary with the active session count and a message. - Integrated Redis client to facilitate session counting.
- Updated the session management to include token expiration by passing the expiry time to the set_session function. - Improved the authentication callback to handle token data more effectively.
- Added frontend URL to OIDC configuration for improved redirect handling. - Updated session management to pass token expiration to the set_session function. - Modified logout endpoint to return a logout URL for Keycloak, enhancing user experience. - Adjusted CORS settings to restrict allowed origins for better security.
- Added a new handleLogout function to manage user logout via an iframe for Keycloak. - Removed the previous inline logout logic from the MainMenu.Item component. - Enhanced error handling and session invalidation upon logout completion.
…authentication - Added Redis password configuration to the .env.template file. - Updated the Redis service command in docker-compose to require the Redis password. - Enhanced README to include Redis setup instructions and password usage.
- Introduced API_WORKERS variable in .env.template for configurable worker count. - Updated startup.sh to utilize the API_WORKERS variable when starting the application with uvicorn.
- Updated startup script to include PostHog key and host in runtime configuration. - Enhanced global TypeScript definitions to accommodate new PostHog properties. - Modified PostHog initialization to utilize runtime configuration values, improving flexibility.
- Updated the Redis client initialization to include password retrieval from environment variables, enhancing security and flexibility in Redis connections.
atyrode
added a commit
that referenced
this pull request
May 1, 2025
* style: update GitHubButton styles for improved layout - Added a margin of 1px to the GitHubButton for better spacing. - Reduced font size from 1.05rem to 0.8rem for a more compact appearance. * feat: integrate Redis for session management - Added Redis service to docker-compose for session storage. - Implemented Redis connection in config.py and updated session management functions. - Refactored dependencies to utilize Redis for session retrieval and deletion. - Updated requirements.txt to include Redis library. * feat: implement token expiration handling and refresh mechanism - Added functions to check if the access token is expired and to refresh the token using the refresh token. - Updated dependencies to utilize the new token management functions in the authentication flow. - Enhanced the login endpoint to support session management with token state. * feat: add endpoint to retrieve active session count from Redis - Implemented a new GET endpoint `/count` to return the number of active sessions stored in Redis. - The endpoint requires authentication and returns a dictionary with the active session count and a message. - Integrated Redis client to facilitate session counting. * feat: enhance session management with token expiration handling - Updated the session management to include token expiration by passing the expiry time to the set_session function. - Improved the authentication callback to handle token data more effectively. * feat: enhance authentication flow and session management - Added frontend URL to OIDC configuration for improved redirect handling. - Updated session management to pass token expiration to the set_session function. - Modified logout endpoint to return a logout URL for Keycloak, enhancing user experience. - Adjusted CORS settings to restrict allowed origins for better security. * feat: implement logout functionality with Keycloak iframe handling - Added a new handleLogout function to manage user logout via an iframe for Keycloak. - Removed the previous inline logout logic from the MainMenu.Item component. - Enhanced error handling and session invalidation upon logout completion. * feat: add Redis configuration and update docker-compose for password authentication - Added Redis password configuration to the .env.template file. - Updated the Redis service command in docker-compose to require the Redis password. - Enhanced README to include Redis setup instructions and password usage. * feat: add API workers configuration to environment and startup script - Introduced API_WORKERS variable in .env.template for configurable worker count. - Updated startup.sh to utilize the API_WORKERS variable when starting the application with uvicorn. * feat: add PostHog configuration to runtime settings - Updated startup script to include PostHog key and host in runtime configuration. - Enhanced global TypeScript definitions to accommodate new PostHog properties. - Modified PostHog initialization to utilize runtime configuration values, improving flexibility. * feat: add Redis password configuration to Redis client in config.py - Updated the Redis client initialization to include password retrieval from environment variables, enhancing security and flexibility in Redis connections.
atyrode
added a commit
that referenced
this pull request
May 1, 2025
* style: update GitHubButton styles for improved layout - Added a margin of 1px to the GitHubButton for better spacing. - Reduced font size from 1.05rem to 0.8rem for a more compact appearance. * feat: integrate Redis for session management - Added Redis service to docker-compose for session storage. - Implemented Redis connection in config.py and updated session management functions. - Refactored dependencies to utilize Redis for session retrieval and deletion. - Updated requirements.txt to include Redis library. * feat: implement token expiration handling and refresh mechanism - Added functions to check if the access token is expired and to refresh the token using the refresh token. - Updated dependencies to utilize the new token management functions in the authentication flow. - Enhanced the login endpoint to support session management with token state. * feat: add endpoint to retrieve active session count from Redis - Implemented a new GET endpoint `/count` to return the number of active sessions stored in Redis. - The endpoint requires authentication and returns a dictionary with the active session count and a message. - Integrated Redis client to facilitate session counting. * feat: enhance session management with token expiration handling - Updated the session management to include token expiration by passing the expiry time to the set_session function. - Improved the authentication callback to handle token data more effectively. * feat: enhance authentication flow and session management - Added frontend URL to OIDC configuration for improved redirect handling. - Updated session management to pass token expiration to the set_session function. - Modified logout endpoint to return a logout URL for Keycloak, enhancing user experience. - Adjusted CORS settings to restrict allowed origins for better security. * feat: implement logout functionality with Keycloak iframe handling - Added a new handleLogout function to manage user logout via an iframe for Keycloak. - Removed the previous inline logout logic from the MainMenu.Item component. - Enhanced error handling and session invalidation upon logout completion. * feat: add Redis configuration and update docker-compose for password authentication - Added Redis password configuration to the .env.template file. - Updated the Redis service command in docker-compose to require the Redis password. - Enhanced README to include Redis setup instructions and password usage. * feat: add API workers configuration to environment and startup script - Introduced API_WORKERS variable in .env.template for configurable worker count. - Updated startup.sh to utilize the API_WORKERS variable when starting the application with uvicorn. * feat: add PostHog configuration to runtime settings - Updated startup script to include PostHog key and host in runtime configuration. - Enhanced global TypeScript definitions to accommodate new PostHog properties. - Modified PostHog initialization to utilize runtime configuration values, improving flexibility. * feat: add Redis password configuration to Redis client in config.py - Updated the Redis client initialization to include password retrieval from environment variables, enhancing security and flexibility in Redis connections. Co-authored-by: cyclotruc <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #39 and vastly improve the whole logging/logout flow of the app with a proper handling of OICD sessions and tokens lifetime.