Skip to content

Instantly share code, notes, and snippets.

@KyMidd
Last active July 9, 2025 03:21
Show Gist options
  • Select an option

  • Save KyMidd/4dff42b23b83e5ca6c4b42a201a03132 to your computer and use it in GitHub Desktop.

Select an option

Save KyMidd/4dff42b23b83e5ca6c4b42a201a03132 to your computer and use it in GitHub Desktop.
def lambda_handler(event, context):
# ...
# Check if the event POSTED to URI /callback
if event.get("rawPath") == "/callback":
print("🟢 Received callback event")
# Set values to vars
auth_code = event["queryStringParameters"].get("code")
aad_object_id = event["queryStringParameters"].get("state")
# Debug
if os.environ.get("VERA_DEBUG") == "True":
print("🟢 Auth Code:", auth_code)
print("🟢 State (which is aad_object_id):", aad_object_id)
# Build auto-close page for user
autoclose_page = build_autoclose_page()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment