-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: Improved toolbar authentication (with support for CLI) #22295
base: master
Are you sure you want to change the base?
Conversation
# Conflicts: # posthog/api/user.py
# Conflicts: # posthog/api/__init__.py # posthog/api/client_auth.py # posthog/api/routing.py # posthog/jwt.py # posthog/urls.py
I will close #22321 in favor of this one |
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
# Conflicts: # frontend/src/lib/components/HedgehogBuddy/hedgehogBuddyLogic.ts # frontend/src/scenes/appScenes.ts # frontend/src/scenes/sceneTypes.ts # frontend/src/scenes/scenes.ts # frontend/src/toolbar/bar/Toolbar.tsx # posthog/api/__init__.py # posthog/api/action.py # posthog/api/feature_flag.py # posthog/api/personal_api_key.py # posthog/api/routing.py # posthog/api/team.py # posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr # posthog/api/test/notebooks/__snapshots__/test_notebook.ambr # posthog/api/user.py # posthog/jwt.py # posthog/models/user.py # posthog/permissions.py # posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr # posthog/tasks/test/__snapshots__/test_process_scheduled_changes.ambr
📸 UI snapshots have been updated12 snapshot changes in total. 0 added, 12 modified, 0 deleted:
Triggered by this commit. |
Problem
For the CLI hackathon - adds a secure flow for passing a jwt to the cli to be used.
The outcome of this made me think that we could use this for the toolbar as well, improving the auth flow for it and potentially allowing solutions that don't work well with the hash param state (via
posthog.loadToolbar()
)WARNING - As this is auth related we should think slowly before we merge. For now we can demo the tool on this PR.
Changes
TemporaryTokenAuthentication
in favour of the new JWT based flowTODO
👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Does this work well for both Cloud and self-hosted?
How did you test this code?