PostHog / squeak

A Q&A widget for your docs
https://squeak.posthog.com/
MIT License
176 stars 15 forks source link

Logout, forgot password, cookie domain fixes #195

Closed ajsharp closed 2 years ago

ajsharp commented 2 years ago

This PR includes three changes:

  1. It removes the allowedOrigin middleware from the /api/logout endpoint, which checks for the presence of a organizationId param, which we don't need for this endpoint
  2. It fixes a bug with the forgot password endpoint to differentiate b/w sdk clients and internal (squeak.cloud) clients, using a default email config for squeak.cloud client requests
  3. Sets the cookie domain to the origin of the requesting site. For example, sessions that originate on posthog.com will not carry over to squeak.cloud cc @corywatilo