Log Auth0 session_id for the callback request after login#1741
Merged
stephencdaly merged 1 commit intomainfrom Feb 3, 2025
Merged
Log Auth0 session_id for the callback request after login#1741stephencdaly merged 1 commit intomainfrom
stephencdaly merged 1 commit intomainfrom
Conversation
b90184e to
187c46a
Compare
chao-xian
approved these changes
Feb 3, 2025
Log the session_id that we get in the post-login callback request from Auth0 so that we can link this up to the login events logged by Auth0 itself. Without this, we have no link between the Auth0 logs and our application logs meaning that if Auth0 returns a success login response but we fail to handle it for any reason on our end, we can't match up the 2 sets of logs.
187c46a to
e164d77
Compare
|
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
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.



What problem does this pull request solve?
Trello card: https://trello.com/c/GB7aE55f/2090-spike-investigate-matching-up-auth0-logs-and-forms-admin-application-logs
Log the session_id that we get in the post-login callback request from Auth0 so that we can link this up to the login events logged by Auth0 itself. Without this, we have no link between the Auth0 logs and our application logs meaning that if Auth0 returns a success login response but we fail to handle it for any reason on our end, we can't match up the 2 sets of logs.
Example log line that will be logged by forms-runner for the callback request:
{ "method": "GET", "path": "/auth/auth0/callback", "format": "html", "controller": "AuthenticationController", "action": "callback_from_omniauth", "status": 302, "allocations": 5779, "duration": 31.77, "view": 0.0, "db": 15.93, "location": "http://localhost:3000/account/organisation/edit", "request_host": "localhost", "request_id": "efed4709-819d-4d45-a422-4fced8b28fd8", "session_id_hash": "dfef79304e387ccb098355bab74c9740372d1205bef1814dae4517749ef6f37d", "auth0_session_id": "lPXuGGemIDlYpn8hilHGh0tquZW16PFk" }We can link this up to the Auth0 event using the
auth0_session_idwhich is thesession_id:Things to consider when reviewing